Question

The new set of Google APIs could be used in Android with the Client Library and can be authenticated using

  1. OAuth1.0
  2. OAuth2.0
  3. Client Authentication (android).

Can someone show me an example of Client Authentication using GoogleAccountManager class? I can't get one working.

Also when I use OAuth2.0 and use a redirect URL like buzz-sample:/// and add an intent filter to the Manifest like

<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="buzz-sample" />
</intent-filter>

It throws an error in the browser invalid-request: Invalid parameter value for redirect_uri: Missing authority: buzz-sample:///

Error 400

Any help would be appreciated.

Was it helpful?

Solution

There's a pretty good example here that should do what you want. http://code.google.com/p/google-api-java-client/source/browse/buzz-v1-json-oauth2-android-sample/?repo=samples

Here's a small code snippet demonstrates how to use AccountManager#getAuthToken to get an AccessToken: http://chiarg.com/?p=429

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top