Figured it out myself. I am sending registration id in the message,
so I can check it against the stored registration id on the device.
If it's not the same, discard it and notify the service that
registration Id is no longer in use
Downside is sending registration Id takes up some space in already
limited message size. But works perfectly in my case since my
original message is no more than a few chars long.
On Jul 12, 4:44 pm, Atlusr1 <
atlu...@gmail.com> wrote:
> I am having the same issue described in this post
>
>
http://groups.google.com/group/android-c2dm/browse_thread/thread/cb7e...
>
> I read and didn't know if there was a solution. For some reason, I
> can't reply to that post to ask my question, so I am posting it new
> here.
>
> Essentially it's the same problem:
>
> 1) User installs the app and subscribe for c2dm (registration key is
> sent to app server)
> 2) User uninstalls the app.
> 3) User reinstalls the app and subscribes for c2dm (new registration
> key is sent to app server)
>
> Now I have 2 registration keys on app server for the same device and
> same app.
>
> I thought about tracking device Id, it doesn't seem like a good idea
> after readinghttp://
android-developers.blogspot.com/2011/03/identifying-app-instal...