Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an Android GCM equivalent to the iOS Push Notification Feedback Service?

Our webapp sends push notification requests to iOS and Android devices.

For iOS, the Apple Push Notification Service has a feedback service so you can detect which devices have uninstalled your app and then remove it from your database.

Is there a similar feedback service for Android GCM? If not, how to detect which Android users no longer have the app installed?

like image 831
ban-geoengineering Avatar asked May 16 '13 19:05

ban-geoengineering


People also ask

Does Android have push notifications?

Turn on notifications for Android devices Tap More on the bottom navigation bar and select Settings. Tap Turn on notifications. Tap Notifications. Tap Show notifications.

What is a GCM in Android?

Google Cloud Messaging (GCM) was a mobile notification service developed by Google that enables third-party application developers to send notification data or information from developer-run servers to applications that target the Google Android Operating System, as well as applications or extensions developed for the ...


1 Answers

Is there a similar feedback service for Android GCM?

No.

If not, how to detect which Android users no longer have the app installed?

Quoting the documentation:

  1. The end user uninstalls the application.
  2. The 3rd-party server sends a message to GCM server.
  3. The GCM server sends the message to the device.
  4. The GCM client receives the message and queries Package Manager about whether there are broadcast receivers configured to receive it, which returns false.
  5. The GCM client informs the GCM server that the application was uninstalled.
  6. The GCM server marks the registration ID for deletion.
  7. The 3rd-party server sends a message to GCM.
  8. The GCM returns a NotRegistered error message to the 3rd-party server.
  9. The 3rd-party deletes the registration ID.

Note that it might take a while for the registration ID be completely removed from GCM. Thus it is possible that messages sent during step 7 above gets a valid message ID as response, even though the message will not be delivered to the device. Eventually, the registration ID will be removed and the server will get a NotRegistered error, without any further action being required from the 3rd-party server (this scenario happens frequently while an application is being developed and tested).

like image 146
CommonsWare Avatar answered Oct 18 '22 22:10

CommonsWare