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.
Asked
Active
Viewed 4,683 times
1 Answers
11
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.

Frank van Puffelen
- 565,676
- 79
- 828
- 807
-
Frank van Puffelen generally i send notification it receives all applications right? What is the use to add multiple apps in single project? is multiple app only for different build environment? – Ramki Anba Jun 05 '17 at 08:34
-
FCM messages can be targeted to a specific device (or list of specific devices), a device group, or a topic. I have projects with many apps, each of them doing something unrelated. If I'd want to send messages to the users of a specific app, I'd make a topic mapping as I described in my answer. – Frank van Puffelen Jun 05 '17 at 08:37