Open the app when a certain push notification is received?


#1

I’m using the firebase plugin with cloud messaging enabled. How do I open the app when a certain push notification is received? Kind of like Skype or Whatsapp where it will show a custom screen with a ringer.

Or opening from a background service if push notifications don’t work?


#2

At least with iOS you can’t do that - simply open the app without user action. It may be annoying for a user when app gets opened as soon push received.

You can open it when notification is clicked by user - which is exactly WhatsApp or Skype does.


#3

Thanks for your answer. I found that with Android, apparently I can launch an activity, but you’re right that iOS can’t. Instead they have this PushKit API whose VoIP push notifications can open a view, but alas I have no idea how to implement that, so I guess I’ll be experimenting with writing a Nativescript plugin all day tomorrow.