In Android 2.2 the private API GoogleLoginServiceHelper can no longer
return auth tokens with the getCredentials() method it seems. This is
fine as it is a private API and using it was always risky. However, I
was using it to retrieve an auth token for use as a cookie to visit
the Google Reader site in a webview. This was retrieved by setting the
service string in the getCredentials() call to null. This required the
permission
com.google.android.googleapps.permission.GOOGLE_AUTH.OTHER_SERVICES in
the manifest.

I have tried using the AccountManager available since Android 2.0 and
I can retrieve an auth token for the Google Reader API by setting the
authTokenType to "reader" in getAuthTokenByFeatures(). However, this
token cannot be used as a cookie in the webview. The user is asked to
login in again which isn't a great experience. I have tried retrieving
a second auth token with authTokenType set to null but this causes an
IllegalArgumentException. I have also tried "misc", "all", "web",
"generic", "general", "other", "google" and an empty string, none of
which work.

I guess what I am getting is, can a list of valid authTokenTypes be
published please?

-- 
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