Reputation: 2024
Say User A has subscribed to Topics T1, T2 and T3.
If I send same notification to Topics T1 and T3. Will A receives two notifications ?
If So, how to avoid this duplicate notifications ?
Thanks
Upvotes: 5
Views: 2232
Reputation: 139
You have to send your notifications to multiple topics at once as shown in firebase documentation:
https://fcm.googleapis.com/fcm/send
Content-Type:application/json
Authorization:key=AIzaSyZ-1u...0GBYzPu7Udno5aA
{
"condition": "'dogs' in topics || 'cats' in topics",
"data": {
"message": "This is a Firebase Cloud Messaging Topic Message!",
}
}
More details here: https://firebase.google.com/docs/cloud-messaging/android/topic-messaging
Upvotes: 3