2

I have the following question:

I've successfully implemented C2DM in my application. I'm registering to both google c2dm cloud and a custom server that "creates" notification contents. Everything is working fine. My question is : what happens when i uninstall my app and then reinstall it on the same device? I've noticed that C2DM is sending me back the same app_key, so apparently there's no way to determine my app installation status change. And i keep on receiving old push notification (they're customized by user preferences in the app). I won't be able to test with a google play published app until final release, so i would like to know if there's a chance that google itself could notify c2dm that the app was uninstalled on my device and force it to change my app_id at next restart.

Thanks in advance Stefano

Stefano Mondino
  • 1,219
  • 11
  • 15

1 Answers1

1

From what I understand in C2DM, you shouldn't depend on Google's registration ID by itself. They "promise" nothing - you might even get a new registration ID without a clear reason (might be their own vrsion upgrades, etc.).
If you want to follow installation - you should do it with your own server - create a unique identifier whenever the app asks for registration, and use it and not the Google's registration ID.
Regarding to Google Play - couldn't find a difference between published app and unpublished one - the behavior seems to be the same.
Hope this helps somehow.
Shushu

Shushu
  • 774
  • 6
  • 19
  • You're right, in fact I am not depending on google's registration ID : at every application launch, I ask for a new ID, which can be really a new one or simply the old one; I'm storing the received value in any case and I'm passing it to external server along with custom app parameters. The problem is that with a fresh install I may not have custom preferences set in my application (i'm sending a list of favourite items and i'm expecting to be notified about their news, but at freshinstall my list is empty) and external server is ignoring an empty list.Server guys will have to implement it :) – Stefano Mondino May 23 '12 at 12:25