voximplant / react-native-voximplant

Voximplant mobile SDK for React Native (iOS/Android)
http://voximplant.com
205 stars 39 forks source link

Notification not received when app is killed in Android #141

Open AyeshRehmanSalsoft4109 opened 2 years ago

AyeshRehmanSalsoft4109 commented 2 years ago

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

YuliaGrigorieva commented 2 years ago

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

AyeshRehmanSalsoft4109 commented 2 years ago

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

YuliaGrigorieva commented 2 years ago

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

bsor-dev commented 1 year ago

@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