react-native-voximplant icon indicating copy to clipboard operation
react-native-voximplant copied to clipboard

Notification not received when app is killed in Android

Open AyeshRehmanSalsoft4109 opened this issue 3 years ago • 4 comments

Hi, I can receive notifications when app is active or in background but when the app is killed call is failed.

Response I receive afterwards:

Code: 480 Name: Failed Reason: Temporarily Unavailable

AyeshRehmanSalsoft4109 avatar Jan 24 '22 16:01 AyeshRehmanSalsoft4109

Hello @AyeshRehman ,

This error code means that the callee was not logged in when the caller made a call.

To receive the incoming calls when the application is killed, you need to set up push notifications in the Voximplant Control Panel and register a push token on the application side.

Best regards, Yulia Grigorieva

YuliaGrigorieva avatar Jan 24 '22 19:01 YuliaGrigorieva

Hello @AyeshRehman ,

This error code means that the callee was not logged in when the caller made a call.

To receive the incoming calls when the application is killed, you need to set up push notifications in the Voximplant Control Panel and register a push token on the application side.

Best regards, Yulia Grigorieva

Hi @YuliaGrigorieva I have already setup push notifications in the Voximplant Control Panel and in the app as well and notifications are working fine when the app is in active or in background. Notifications are not working when the app is killed.

Regards, Ayesh Rehman

AyeshRehmanSalsoft4109 avatar Jan 25 '22 08:01 AyeshRehmanSalsoft4109

Hello @AyeshRehman ,

It seems something is wrong with push notifications setup.

I recommend to do the following steps:

  1. launch the application
  2. ensure that Client.registerPushNotificationsToken API is called and you see similar logs in the android logcat output

2022-01-25 15:16:52.922 28519-28963/com.voximplant.sdkdemo I/VOXSDK: GWConnection[CONNECTED]: SEND: {"type":"msg","payload":{"name":"registerPushToken","params":[....]},"seq":2} 2022-01-25 15:16:53.281 28519-28963/com.voximplant.sdkdemo I/VOXSDK: GWConnection[CONNECTED]: onMessage: {"payload" : {"name" : "registerPushTokenResult" , "params" : [... , "status" : "OK", ....}]} , "seq" : 3 , "type" : "msg"}

  1. if you see these logs, kill the application and make a test call to this device
  2. after the call is failed on the caller side, go to the Voximplant Control Panel -> Applications -> Select the Voximplant application you use for this case -> Call History -> Last call -> View logs
  3. Follow the instructions on this page: https://voximplant.com/docs/howtos/sdks/push_notifications/troubleshooting

Please let me know if it helps

Best regards, Yulia Grigorieva

YuliaGrigorieva avatar Jan 25 '22 12:01 YuliaGrigorieva

@YuliaGrigorieva we got same issue if the app is disabled in autostart. If enabled it works fine even the app is killed but not if disabled

bsor-dev avatar Nov 09 '22 16:11 bsor-dev