0

I developed an Android application that uses GoogleAccountCredential to authenticate with Google and uses the Gmail API. For me, it works fine. I followed all the steps to create the application in an application console.

I installed the application on another phone of my friend and this doesn't work.

I checked my friend's Google account settings - account permission (https://security.google.com/settings/security/permissions) and the application doesn't show up there.

The question is: why the application doesn't show up there? What do I have to do to get my application work?

Thanks.

ucMedia
  • 4,105
  • 4
  • 38
  • 46
bacclaudiu
  • 31
  • 4
  • Please try to catch the stacktrace and post it. Or see whether you can do anything with that stacktrace! – Kavin Prabhu Mar 10 '15 at 13:46
  • Something wrong about your OAuth? https://developers.google.com/accounts/docs/OAuth2 – kaho Mar 10 '15 at 15:08
  • Thanks for the clue Kevin. Tomorow i will try. – bacclaudiu Mar 10 '15 at 16:00
  • I catch the stacktrace and I receive: com.google.api.client.googleapis.extensions.android.gms.auth.UserRecoverableAuthIOException at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential$RequestHandler.intercept(GoogleAccountCredential.java:284) at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:859) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410) – bacclaudiu Mar 11 '15 at 09:51
  • Caused by: com.google.android.gms.auth.UserRecoverableAuthException: NeedPermission at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source) at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source) at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential.getToken(GoogleAccountCredential.java:255) at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential$RequestHandler.intercept(GoogleAccountCredential.java:279) – bacclaudiu Mar 11 '15 at 09:54

1 Answers1

1

The reason my app doesn't work is because I'm not catch the UserRecoverableException to triggering the intent to get the user authorize for app. For more details take a look here

Now I can see the permision in Google account settings - account permission.

Community
  • 1
  • 1
bacclaudiu
  • 31
  • 4