Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send Firebase message to specific application in project?

I have a doubt based on firebase. It allows to add multiple application for a single project. I have added App1, App2 and App3. How can I send a notification to App1 alone? Server key is the same for those 3 apps.

like image 689
Ramki Anba Avatar asked Jun 05 '17 08:06

Ramki Anba


1 Answers

In the Notifications panel in the Firebase Console, you can send a notification message to a specific app. But there is no support for such targeting in the Firebase Cloud Messaging API.

You can easily emulate the behavior though, by defining a specific property for each of your apps: /topics/apps-app1, /topics/apps-app2, etc. Then have each app subscribe to its own topic and you can target the users of each app with a single FCM server key.

like image 96
Frank van Puffelen Avatar answered Nov 10 '22 01:11

Frank van Puffelen