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?