react-native-voximplant
react-native-voximplant copied to clipboard
Notification not received when app is killed in Android
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
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
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
Hello @AyeshRehman ,
It seems something is wrong with push notifications setup.
I recommend to do the following steps:
- launch the application
- 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"}
- if you see these logs, kill the application and make a test call to this device
- 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
- 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 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