0

I am following the google drive android quick start sdk here. The only difference is that I am using intellij instead of eclipse.

The app throws an exception when uploading the file:

File file = service.files().insert(body, mediaContent).execute();

The exception message is access not configured.

Now googling this error yields some results:

I have checked in the google cloud console that both the drive api & the drive sdk are activated. I have registered an app with the correct package name. I also added google cloud storage just in case. What else should I check?

Edit

I am really confused by the documentation. This page mentions the getToken method, but the sample application uses GoogleAccountCredential.usingOAuth2 which documentation is Constructor a new instance using OAuth 2.0 scopes.

When registering the application, I get some information like client secret/client ID. I could find information here explaining how to use this data, but I could not find this kind of example for an android app.

Community
  • 1
  • 1
Simon Bergot
  • 10,378
  • 7
  • 39
  • 55

1 Answers1

0

In the API Console, when you register/create an app, a Client ID is generated. Have you coded that Client ID into your app? The answer to the first SO link you gave has details.

pinoyyid
  • 21,499
  • 14
  • 64
  • 115
  • `Have you coded that Client ID into your app?`I have looked very hard at the documentation, but I could not find any place where to use this client ID. – Simon Bergot Nov 17 '13 at 16:41