The first thing I found in the device group documents that I found undocumented is that if you delete the only registration ID within the device group, the notification_key
for that device group is deleted.
Therefore, when managing the registration of device groups, I have to keep track of the registration identifiers that I registered in my application that uses GCM. Thus, I know whether to βcreateβ a group or βaddβ to a group, depending on whether this group has at least one registration identifier. You think that Google will not impose such behavior (why their API cannot determine whether to perform the add
or create
operation), but this is what it is.
My question is: when else can notification_key
be deleted? One of the scenarios that I see will be a user on 1 device that receives a second GCM registration identifier after> ~ 6 months of using the application. Let's say their GCM registration ID was 123abc
when they first used the application, and now their GCM 456xyz
registration ID. If the user logs out, I will remove 456xyz
from the device group. But do I need to remove 123abc
from a device group? And if I do not, the device group / notification_key
will remain active?
Another scenario would be if the user uninstalls the application and then returns in a few days. When the application is deleted, the GCM registration identifier that was added to the device group will be invalid - I believe that they are unique in real application installations. So, is there a chance that notification_key
will be deleted before the user reinstalls the application and tries to reconnect with the supposed existing device group / `notification_key '?
source share