Changing google accounts on the device.

35 views
Skip to first unread message

KS

unread,
Jan 24, 2011, 2:47:44 AM1/24/11
to android-c2dm
C2DM folks.

I am facing a peculiar issue that I wanted some help with. It looks
like changing gmail/google accounts on my device somehow hampers C2DM
notifications reaching my device. My assumption is that there should
be one signed in google account on the phone - not necessarily the one
that the phone was registered with google originally.

Here're the steps I follow

1. On a device signup as X...@gmail.com as the only signed up account.
2. App registers and sends back the device registration id.
3. Push a notification to the device,
4. Notification successfully reaches the device.
5. Now, from the browser, change the password of X...@gmail.com
6. On the device, X...@gmail.com reports authentication problems (as
expected).
7. Now, add a new gmail account on the device Y...@gmail.com.
8. Y...@gmail.com is the only active account on the device.
9. Push a notification to the device.
10. Although "send" request is successful, the notification never
reaches the device. (Even after waiting for a long time).

What can I do to get the notifications working again - does my app
have to re-register again ?

Any help appreciated.

Thanks
KS.

gunnar-mobimation

unread,
Jan 29, 2011, 8:32:22 AM1/29/11
to android-c2dm
Yes the way this is set up there is a correlation between registration
ID and a specific Google account.
I would assume the way it´s supposed to work is every user of a C2DM
enabled application need to be in possession of an application ID
associated specifically to his/her Google ID. The user of that
Android C2DM enabled app would as a one-time action be prompted by the
app to input Google account details. A cloud based application that
sends a C2DM message to say 100 users (say a corporate IT department)
needs access to the credentials of each user (as submitted by each
Android C2DM app to that department´s HTTPS server). Upon submitting a
C2DM message via a Google server from that HTTPS server the message
originating party needs to pass along this registration data about the
destination app so the Google C2DM service knows where to send the
message. If the user on the client has changed then the Google C2DM
service needs to have the new data so it can send the message over the
correct Google account session.

If you see flaws in this assumption please correct.

Regards,
/gunnar

Costin Manolache

unread,
Jan 29, 2011, 11:19:32 AM1/29/11
to androi...@googlegroups.com
The 'primary' account on the phone is special - it is used to authenticate
the phone when talking with google servers. If you changed the password on web
and didn't update it on the phone than probably Talk, Gmail notifications, Market 
will no longer work.  C2DM is using the same TCP connection, so it can't work either.

The registration id itself doesn't have any info about the accounts on the phone, only 
about the android id.



Costin

richf

unread,
Sep 12, 2011, 7:54:19 PM9/12/11
to androi...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages