Error : ConnectionResult{statusCode=INTERNAL_ERROR, resolution=null}
Heads up! There's a problem in the Developers Console.
If you are getting this bug even after 1) making sure that you have registered the package name with its corresponding certificate fingerprint, and 2) are (re)using an already existing project, then you should check that this project has an product name and an email address (double check that one specially) associated with it, both to be found in the "consent screen" section.
Very old projects may not have these two fields populated. Newer projects have these fields filled out with some default values.
Took me a day to find this...
I resolve this issue by signing my Google Drive application on API console following these steps
- Go to the Google Developers Console.
- Select a project, or create a new one.
- In the sidebar on the left, expand APIs & auth. Next, click APIs.
- In the list of APIs, make sure the status is ON for the Drive API.
- In the sidebar on the left, select Credentials.
If your application needs to submit authorized requests:
- Under OAuth, click Create new Client ID.
- Select Installed application and Android.
- In the Package name field, enter your Android app's package name.
- Paste the SHA1 fingerprint into the form where requested.
- Click Create Client ID.
I solved the issue from register the application and generate signing certificate fingerprint.
https://developers.google.com/drive/android/auth#generate_the_signing_certificate_fingerprint_and_register_your_application
I followed above links and It solved my problem.
For me the problem was that when in the example there was :
.addApi(Drive.API)
And I didn't added the drive api in the console
this error message helped me to figure out the issue
com.google.android.gms.drive.auth.c: Authorization failed: server returned error: Access Not Configured. The API is not enabled for your project, or there is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your configuration.. See https://developers.google.com/drive/handle-errors for details.
Don't forget the permissions:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />