Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GCM (Google Cloud Messaging) not sending error on uninstall of app

I'm trying to migrate from C2DM to GCM, and it mostly works just fine. C2DM used to handle uninstalls of the app very well by sending a NotRegistered error when the user uninstalled the app. GCM supposedly does this as well (albeit not guaranteed). However, it doesn't seem to be working. After sending multiple GCM notifications to a phone which has uninstalled the app, it still keeps responding with a normal "id=..." response.

Has anyone else come across this problem? If so, how did you solve it?

like image 862
Shreshth Avatar asked Jul 02 '12 19:07

Shreshth


People also ask

Is GCM still working?

On April 10, 2018, Google deprecated GCM. The GCM server and client APIs were removed on May 29, 2019, and currently any calls to those APIs can be expected to fail. Google Cloud Messaging, deprecated April 10 2018, has been deactivated and removed from Google's APIs.

Is GCM deprecated?

GCM will be replaced by Firebase Cloud Messaging (FCM), which will inherit the reliable and scalable GCM infrastructure, plus many new features.

What is GCM service on Google Play?

Google Cloud Messaging (GCM) is a service that allows you to send push notifications from your server to your users' Android devices, and also to receive messages from devices on the same connection.

What is GCM push notification?

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

There's really nothing we can do about it. Only Google knows when an app is uninstalled and update their device registration database accordingly. Perhaps it takes a couple of hours for NotRegistered response to come back? If after a day, you're still not getting that, then file a bug report with them: http://code.google.com/p/android/issues/list

I can't imagine Google will let this bug stay for too long, as they are potentially looking at sending phantom notifications to thousands or hundred thousands of devices.

like image 71
azgolfer Avatar answered Oct 20 '22 23:10

azgolfer