hoxfon / react-native-twilio-programmable-voice

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

Failed to run the deviceDidReceiveIncoming method #202

Open iPachDev opened 3 years ago

iPachDev commented 3 years ago

Hello everyone, I tried to complete a connect call from any user to client twilio (Andorid Device), but "deviceDidReceiveIncoming" not working.

Did you follow all the instructions as specified in the Twilio Quickstart repositories? Yes What version of React Native are you running? 0.64 What version of react-native-twilio-programmable-voice are you running? "react-native-twilio-programmable-voice": "https://github.com/hoxfon/react-native-twilio-programmable-voice#feat/twilio-android-sdk-5" What device are you using? (e.g iOS10 simulator, Android 7 device)? Mi A2 Lite - Android version 9 Is your app running in foreground, background or not running? foreground & background Is there any relevant message in the log? No

Step to reproduce

When I make a call everything is ok, I can send call, I create a token with permissions to outgoing and incoming

Token Twilio abstract

"grants": {
    "identity": "ANDROIDDEVICENAME",
    "voice": {
      "incoming": {
        "allow": true
      },
      "outgoing": {
        "application_sid": "MYAPPLICATIONSID"
      }
    }

When calling meanwhile client is offline and calling from other device, the call immediately reject, but when client is online and calling from other device, the call is rining, how calling, but the "deviceDidReceiveIncoming" never run

TwilioVoice.addEventListener('deviceDidReceiveIncoming', function(data) {
            console.log('new Call',data);
            TwilioVoice.accept()
        })

Advanced: Have you tried adding break point using AndroidStudio or XCode and analyse the logs? No, whe a try run with android studio, send message "unable to load script make sure you are either running a metro server or that your bundle "index.android.bundle" is packaged correctly for release" can share a project with issue? Yes

Thanks so much !

solutioner00 commented 3 years ago

Hi. I have the same problem. I used v4.4.0, but the app can't receive the background notification. How can we modify with this library?

scottharvey commented 3 years ago

I'm seeing this same issue on iOS, I've added a bunch of logging to the native code and all the other features are working as expected but the deviceDidReceiveIncoming is the only thing that's not working.

sahil8453 commented 1 week ago

+1