hoxfon / react-native-twilio-programmable-voice

React Native wrapper for Twilio Programmable Voice SDK
MIT License
180 stars 153 forks source link

Android: Not getting incoming calls using 'deviceDidReceiveIncoming' event listener #188

Open aishwarya-k11 opened 3 years ago

aishwarya-k11 commented 3 years ago

Please include the following information for better support

The more context you provide around this issue the faster the community can help you

Did you follow all the instructions as specified in the Twilio Quickstart repositories?- Yes What version of React Native are you running? 0.63.2 What version of react-native-twilio-programmable-voice are you running? 4.3.0 What device are you using? (e.g iOS10 simulator, Android 7 device)? Android Simulator - Android 11 Is there any relevant message in the log? No If using iOS, which pod version are you using? NA

Step to reproduce

Advanced: Have you tried adding break point using AndroidStudio or XCode and analyse the logs? can share a project with issue? Did you try to reinstall the pods completely?

salman-pixarsart commented 3 years ago

@aishwarya-k11 event listener's name is "deviceDidReceiveIncoming" and furthermore, you are testing on an emulator you should be using a real device for testing.

TwilioVoice.addEventListener('deviceDidReceiveIncoming', function(data) {
    // {
    //     call_sid: string,  // Twilio call sid
    //     call_from: string, // "+441234567890"
    //     call_to: string,   // "client:bob"
    // }
})
aishwarya-k11 commented 3 years ago

@salman-pixarsart Thank you for your response. I am doing the same thing in componentDidMount along with all the other event listeners, which are working perfectly fine. But this isn't working

jdegger commented 3 years ago

Hi @aishwarya-k11 are you getting the same results on a real device like @salman-pixarsart suggests?

aishwarya-k11 commented 3 years ago

@jdegger Yes