I'm trying to figure out how to manage FCM device groups from an app server by using the REST API.
AFAIK these are the updated docs: https://firebase.google.com/docs/cloud-messaging/android/device-group#managing_device_groups
Here's what I can already do:
- Create a new device group with some device tokens
- Add device tokens to an existing device group
And this is what I just can't figure out how to do since there's no mention of it in the docs:
Query whether a device group already exists, based on its
notification_key_name
.Workaround 1: if I try creating a group with a
notification_key_name
that already exists then I get an error telling me so, but that seems like a very hacky way to find out.Workaround 2: Store that information by myself somewhere else.
Finding out which device tokens (
registration_id
) belong to a device group.Workaround: as before, store that information by myself somewhere else.
Remove device tokens (
registration_id
) from a device group.Workaround: none.
Remove a device group.
Workaround: none.
Thanks!