client auth-token expiration/renewal questions

737 views
Skip to first unread message

zz

unread,
Oct 7, 2010, 7:18:44 PM10/7/10
to android-c2dm
On the official document of c2dm, it mentions

"The time limit on the token varies depending on which service issued
it.". One engineer said that the token can be renewed without user
intervention
http://groups.google.com/group/android-developers/browse_thread/thread/2b8da9801007ea8f

There are also code to proves this
http://groups.google.com/group/android-c2dm/browse_thread/thread/76af0bea6e65213a

Anyone knows what's the max time limit possible, and also what's
required renewal schedule without user intervention, if any at all.

Thanks.

ZZ

Costin Manolache

unread,
Oct 7, 2010, 7:54:36 PM10/7/10
to androi...@googlegroups.com
You should use the Update-Client-Auth response header,  check chrometophone source
 for an example. It requires no user intervention. 

I don't think there is a documented 'max' or average time limit for ClientLogin tokens - it's 
better to not assume anything. 


Costin
 



Thanks.

ZZ


BlueDotLive

unread,
Oct 12, 2010, 12:34:20 AM10/12/10
to android-c2dm
Costin is correct! Anytime you perform a Post to the Google C2DM
server you should read the header response back from the server. It
occasionally includes a new client auth token. You simply need to
parse it out of the header and use it the next time you perform a
post. I'm currently parsing anything between Update-Client-Auth: and
the next CRLF. Don't forget to trim the string for whitespaces due to
the space between Update-Client-Auth: and the token!
Reply all
Reply to author
Forward
0 new messages