android c2dm registration ID
Asked Answered
E

1

7

I read in the explanation in Android Cloud to Device Messaging Framework. After our app register successfully to C2DM server, we receive a registration ID. The registration ID lasts until the application explicitly unregisters itself, or until Google refreshes the registration ID for your application. When is exactly Google refreshes the registration ID for your application?? How do we know it so we can register again and send our new registration ID to our server.

Thank you.

Exertion answered 24/11, 2010 at 10:1 Comment(3)
That information is kind of slim right now, they suggest doing periodical refreshes of the ID, I think that means "were are still in beta and dont want to give any specifics so we can change it", but since this is only speculation, i´ll leave it as a comment and not an answer.Crossrefer
can you suggest how often should i refresh the ID?? Thanks.Exertion
Right now im refreshing every time the main activity of my app is created, I have no idea how this will work, as this app isnt ready for deployment and hasnt been tested enough. I think you are going to have to test it out yourself and report back, it would be great help to yourself and everyone.Crossrefer
S
10

According to discussions on the android-c2dm mailing list, refreshing the registration ID is not a frequent event, but your application should be able to handle it. The OS will fire the registration Intent again with the new registration ID.

See the following threads on Google Groups: [1] [2] [3]

Steadfast answered 20/12, 2010 at 22:52 Comment(2)
So in theory, it should go through our exact code path as the first time registration and "just work", correct?Invasive
Yes, as long as you aren't assuming that that code will only be called once.Steadfast

© 2022 - 2024 — McMap. All rights reserved.