views:

404

answers:

1

Hello,

I've got working code that uses the gdata to retrieve feeds from my user's Google Finance portfolios, but I had to use setUserCredentials(username,password). What I'd like to do is avoid asking the user for their username/password since the Android device already has access to their Google account.

I believe I should be able to do this with setUserToken(String), but I can't figure out how to get the appropriate token from Android. I've tried AccountManager.get(context).blockingGetAuthToken() but that's either not the correct call or I'm passing it the wrong arguments.

Has anyone gotten gdata working with the user's existing Google credentials on the phone?

Thanks in advance, Lenny

A: 

I suspect that you forgot to put USE_CREDENTIALS permission in your manifest file?

instcode
It was in the manifest when I first tested, and android.permission.GET_ACCOUNTS is also in the manifest file.
Lenny T