I am trying to develop the Messenger App like Whatsapp using Firebase.
I'm already done the code for device to device notifications and now I am trying to send the notifications to specified group.
Please provide the example code for the Group Notifications.
There are a few ways to send messages to groups of users:
Keep a list of device tokens for each group in your app server, and then send to each individual device in the group .
You can also use the previous version of the API to send to batches of up to 500 tokens at a time . This sort of multicast delivery is not yet possible in the new API.
For an example of this, see the documentation of Cloud Functions and the sample repo .
Send to a device group with the legacy API . I'd only recommend this approach if the devices are actually owned by one user, which is the case that device groups are meant for.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.