On Wed, Jul 14, 2010 at 8:57 AM, Chister Nordvik <[email protected]> wrote:
> I've been working/struggling with the C2DM examples to get them to
> work in my setup. I have almost everything in place but I can't send
> messages to the device because I haven't a  ClientLogin Auth token. In
> the ChromeToPhone example this seems to be stored in
> "dataMessagingToken.txt".
>
> It's been a long day struggling with this, so does anyone know how I
> get the token to store in this file?

I haven't tried getting Chrome2Phone working, but in general, I'd use
a text editor. :-)

Here's a curl script to get the token:

http://github.com/commonsguy/cw-advandroid/blob/master/Push/C2DM/auth.sh

(though you may need to change GOOGLE to HOSTED depending on what sort
of account you're using)

This will dump LID, SID, and Auth.

> Will this token never change so
> it's safe to store it in a textfile?

It should be good for a couple of weeks. Google is recommending that
you not store your account credentials on your server, but arrange to
update the Auth value by some other means. They will also send down a
replacement Auth value via a custom HTTP header if they think your
current one is getting stale.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to