Stop Receiving Incoming Call
chuongle opened this issue · 12 comments
Hi Twilio team,
I'm trying to implement this VoIP Call with React Native. Everything works fine up to the point when I force close my app, then it stop receiving incoming call. Is there a way to debug on Twilio side if incoming call is trying to happen?
Thanks!
Hi @chuongle
Unless the application explicitly unregister the mobile client from incoming call notifications, the app should still be able to receiving call-invite push even the app was force-closed.
You can check if there is any error/warning being logged in your Programmable Voice dashboard or check the call status in the call log page. It would be great if you can provide us the Twilio Call-SID when you see the same issue happens again and we can investigate if there is any failure on the Twilio side.
Thanks
-bobie
Hi @bchen-twilio,
I don't call unregister anywhere in my app. There is no error in my dashboard. Here are the 2 Call SID I just did:
CA7b4a9208346426c805d6252b3996ddf2
: This call worked when app started and registered.
CA2ff7357f72def9e8c3a81a543e4f2337
: This incoming call did not work when force close app.
Please let me know if you find anything! Thanks!
Thanks @chuongle. Let me take a look at the Call-SIDs and see if I can find anything.
Hi @chuongle
I did run the Call-SID (-2337
) but unfortunately I couldn't find anything unusual regarding notification delivery failure. I tried to compare the signaling paths between the two Call-SIDs and did see some differences. While I go and talk to the backend team to find out what's happening with CA2ff7357f72def9e8c3a81a543e4f2337
- Is this happening every time when you force-close the app?
- Are you able to see the incoming call notification when the app is backgrounded?
@bchen-twilio
This happens every time I force close the app. I don't know if this is part of the React Native issue or not. If my app is in the background I can still receive the incoming call.
Thanks!
@bchen-twilio
I think I know why this happen. The issue is I implement the PushRegistry at the React Native module level, not at the AppDelegate level. So when the app is forced close, it won't be able to receive anything.
Hi @chuongle
Did you manage to move the PushRegistry impl to the AppDelegate level and receive incoming call push notification with the app closed? I am very interested in knowing the hierarchy between the RN modules and the native iOS impl and why it's causing the issue.
Our internal testbed app and the quickstart sample apps implement the PushKit methods in the view-controllers instead of the app-delegate level but are still able to receive pushes even when app closed.
Thanks
-bobie
Hi @bchen-twilio
I moved PushRegistry implementation to AppDelegate level and was able to receive incoming call after force close app. I assume this is why the app can still receive incoming remote notification event after app is closed. I don't fully understand how AppDelegate works. How does it work for quick start app when Pushkit is register at view-controller level?
Thanks!
Thanks for the explanation @chuongle!
Taking the quickstart for example, when a VoIP push notification is sent to the device, the app will be launched by the system (assuming the app was force closed previously) and guaranteed a significantly good amount of time alive. I guess the key here is because the quickstart only has one view-controller and the PKPushRegistry
instance is right away set up in the viewDidLoad
method (see here) so that the PKPushRegistryDelegate
callbacks can be called and the notification is delivered.
Hope this helps answer your question.
-bobie
@bchen-twilio Sorry for the late response. Thanks for your explanation! I still have some confusions I need to understand. I will close the issue. Will let you know if I find any interesting idea about this. Thanks for your help.
Thanks @chuongle. Yeah please feel free to reach out to us in the future if you run into any issue using the Voice SDK. We look forward to your awesome Voice applications!
-bobie
Hello
I am doing VOIP with twillo calling. Application is allow notification while app is background or foreground. we are not received notification while app is close. I have written code in AppDelegate..
But register with Push after socket is connected.