-->

Limit collapse_key count in android GCM

2020-08-05 11:46发布

问题:

StackOverflow, i need your help! I've read gcm documentation here http://developer.android.com/google/gcm/adv.html and don't understand fully what means "GCM only allows a maximum of 4 different collapse keys to be used by the GCM server per device at any given time". I want to explain for myself it. I can assume that if on my phone N applications are installed (facebook, twitter, instagramm, myMail, facebook and other), there is no guarantee that when my device for example will return to online, GCM will choose collapse_key of my app. Am i right or no?? If I am right in what sense of this collapse key if there is no guarantee that it will work and that my app will receive at the right time the necessary notification? I need to point that pattern "Sync-to-load" is very preferrable for me and i want to use it, but I am afraid that problems will begin when user will be write in comments "My device come back online, but i missed all messages:(("

回答1:

The limit on GCM collapse_keys is on a per app level and is not affected by what other apps the user has installed on their phone.