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

2

7

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?

Stella answered 2/7, 2012 at 19:25 Comment(0)
D
1

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.

Deform answered 2/7, 2012 at 20:14 Comment(0)
S
1

I've been migrating from C2DM to GCM, and I thought I was having this problem as well. Long story short, try uninstalling the app from your phone/emulator, then dont reinstall it on that phone/emulator and leave the phone/emulator running for a few hours, then you should get the NotRegistered error if you try to push to that device's registration id.

If I recall correctly even if you reinstalled the app in C2DM after uninstalling you'd get the NotRegistered error for the first registration id, this is not the case with GCM (usually if not always the two registration id's will be the same) and I spent a week thinking GCM had some bug where it wasn't sending that error...

Sacrilegious answered 23/7, 2012 at 2:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.