I went through dozens of answers on this topic, followed the official quick start guide and did everything I could come up with.
I installed my Google Developer Console in all its parts, including setting the correct debugging SHA1 keys for OAuth and Public Access API (I donβt even know if this is necessary).
Problem
I'm having trouble setting areas in GoogleApiClient .
googleClient = new GoogleApiClient.Builder(this) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(Plus.API) .addScope(...) .build();
I can log in with various combinations of areas:
.addScope(new Scope("https://www.googleapis.com/auth/plus.login")) .addScope(new Scope("https://www.googleapis.com/auth/plus.profile.emails.read")) //WORKS! OR: .addScope(Plus.SCOPE_PLUS_LOGIN) // == https://www.googleapis.com/auth/plus.login .addScope(Plus.SCOPE_PLUS_PROFILE) // == https://www.googleapis.com/auth/plus.me //WORKS! OR: .addScope(new Scope("https://www.googleapis.com/auth/plus.profile.emails.read")) //WORKS! OR: .addScope(Plus.SCOPE_PLUS_PROFILE) // == https://www.googleapis.com/auth/plus.me //WORKS!
They all work well, and I see that they are reflected in the requests (i.e. if I set login + emails.read , the dialog will really ask for these two).
However, I only need https://www.googleapis.com/auth/plus.login ". If I just installed .addScope(new Scope("https://www.googleapis.com/auth/plus.login")) or, which is the same, .addScope(Plus.SCOPE_PLUS_LOGIN) , I encountered a Toast error with a good document:
An internal error has occurred.
So, this area (the only one I need) works in conjunction with others (for example, plus.me), but not one. Why is this and what can I do?
source share