Android Tidbits 6/21/2011: Unregister? Nah!

June 21, 2011 Joe Moore

C2DM Unregister Issues

It turns out when you follow the client-side C2DM unregistration process, this does not guarantee that those registration tokens are permanently unregistered for that device.

If we unregister as specified above and then send a push notification to that registration_id, the server receives an Error=NotRegistered as expected.

But, unexpectedly, when that device re-register with C2DM (and getting a new registration_id), the old registration_id is reactivated as well and can receive push notifications and does not result in a server-side Error=NotRegistered.

The end result: we implemented our server-side API to take both the new and old registration_ids when the Android client successfully registers with C2DM, allowing us to manually delete the old registration_id.

Drawable XML Files

Prefixing the name of a drawable xml file with “active_” seems to prevent android from using that drawable at all.

About the Author

Biography

More Content by Joe Moore
Previous
Android Tidbits 6/22/2011: Hiding Header Views
Android Tidbits 6/22/2011: Hiding Header Views

Android ListView#addHeaderView and ListView#addFooterView methods are strange: you have to add the header a...

Next
Xtreme Labs Expands to Palo Alto, California
Xtreme Labs Expands to Palo Alto, California

We are proud to announce that we’ve expanded to a new office at 170A University Avenue in Palo Alto, the he...

Enter curious. Exit smarter.

Learn More