android - GCM and App update: how re-register if app is not open after update? -
I have an app that receives gcm notifications and in the background
Service (classic pattern).
The documentation says that, if an app is updated, the registration ID may be useless and it is necessary to check a new registration ID. The sample provided by Google () shows that, soon, the main activity should be checked at the Owncreate (or
OnResume ).
However, if the user does not open the app and immediately after app through the Play Store? In this case, there is a risk, after the update, the registration ID is invalid and the notifications (and my background service stops to update local data) is to stop?
Or maybe this matter is managed
Google
Thanks
Thank you, max
& lt; Receiver Android: name = ". UpdateReceiver" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.PACKAGE_REPLACED" /> & Lt; Data Android: Path = "& lt; YOUR_PACKAGE_NAME_HERE" & gt; Android: scheme = "package" /> & Lt; / Intent-Filter & gt; & Lt; / Receiver & gt;
Whenever your app is updated, what will you say? When it is said, you should forget your registration ID and re-register with GCM.
Comments
Post a Comment