3

I have an SASL mechanism set up to respond to X-GOOGLE-TOKEN.

I also have my AccountManager and Account that I want to use from the device.

Now I call the getAuthToken method like this to get a token:

accountManager.getAuthToken(account, "talk", null, this,
            new AccountManagerCallback<Bundle>() {...});

And it prompts me to allow the app access to Google Talk.

Then I send it back like so:

"<auth mechanism="X-GOOGLE-TOKEN">" + "\0" + user@gmail.com + "\0" + token + "</auth>"

However, google then responds with an authentication failed... So I must be requesting the token incorrectly... Or maybe the token I'm getting is for OAUTH?

If it's for OAUTH, is there a pre-written SASLMechanism for that? If so, where do I get a google API key to use the the token android provides me, or do I need one?

Kara
  • 6,115
  • 16
  • 50
  • 57
orb360
  • 135
  • 1
  • 3
  • Please look at this answer: http://stackoverflow.com/questions/6194899/authenticate-to-google-talk-xmpp-smack-using-an-authtoken/6211324#6211324 – Joe Hildebrand Apr 24 '12 at 05:26

0 Answers0