Android push notifications

Hi,

I was wondering how are you initiating calls on android devices. On iOS I am using VoipPush notifications, but I cannot find a similar setup for android. What mechanisms do you use? I saw some threads here using socket.io, but I do not think it is a good approach, I would prefer the push notifications for this.

Thanks for your inputs.

You can use RN Firebase and pray that things work as expected.
Sadly Android doesn’t have VOIP Notifications like iOS as far as i’m aware.
Mostly you could do simple data notifications and then instruct the app of what to do on receiving the notification.

But you will have a lot of teething issues as a lot of different Android devices and versions implement random things which can delay or prevent notification delivery.
Might wanna look into something called doze mode.

Recently i published a simple module that has some useful functions which would help the situation, things like starting the app and applying wake locks to wake the device up/keep the screen on.
Very useful to use along with the Firebase notification.
You can find that here.

This looks good. One infrastructure question - how would you open a specific RN screen?

As the Android version of RN has headless background tasks and Firebase uses them.
That allows you to do things with your notification data within JavaScript while the app isn’t running.
You could essentially grab the data, connect to a socket server, verify the call info, then choose to save the state, start the app, at that point the apps initialize functions would grab the state and dispatch that to the navigation to show the call screen.

You could also override the native Firebase Android methods and do most of the heavy lifting there and then run your own app starting function and just give it a bundle of props.
Then when the app starts, you can grab them props, feed it over to the navigation.