During registration the receiver can get an error of
TOO_MANY_REGISTRATIONS if the user has too many C2DM apps registered
on the device. I understand I should handle this case gracefully, but
I'm wondering if we can get a good ballpark as to how many
registrations is too many. Basically I'm trying to assess the risk of
this happening. I installed 21 test apps that all request c2dm
registrations without receiving this error (but all using the same
email address, so I'm not sure how good my experiment is).
Also what is the correct way to handle this behavior?
I could go
through the trouble of generating a list of applications that have
intent filters to handle the action
"com.google.android.c2dm.intent.REGISTRATION" and tell the user to
uninstall one, but that seems like a recipe for disaster for every
c2dm developer to be implementing themselves. I assume at some point
this will be configurable on the device through settings?
On Thu, Sep 16, 2010 at 2:31 AM, David <docg...@gmail.com> wrote:During registration the receiver can get an error of
TOO_MANY_REGISTRATIONS if the user has too many C2DM apps registered
on the device. I understand I should handle this case gracefully, but
I'm wondering if we can get a good ballpark as to how many
registrations is too many. Basically I'm trying to assess the risk of
this happening. I installed 21 test apps that all request c2dm
registrations without receiving this error (but all using the same
email address, so I'm not sure how good my experiment is).
Also what is the correct way to handle this behavior?I would recommend to notify the user about the "too many registrations" problem and then use an exponential fallback algorithm for further connection attempts. (i.e. each retry after the 2nd attempt has a short blocking sleep that gets longer on each attempt. Its probably a good idea to have a bound for the maximum number of connection attempts).