Last day I started to receive "An internal error occured" while trying to sign user with Google Plus in my application, that I used well and have not changed. The code has not changed for a long time.
GmsClient
returns
connect: bindService returned true for Intent { act=com.google.android.gms.plus.service.START }
service broker connected, binder: android.os.BinderProxy@40fdbd20
And right after that shows toast message "An internal error occured".
I tried to compile Google SDK+ samples and run on the same device but it shows the same error. Maybe something changed in Google APIs?
My "internal error occur" solution:
Follow the demo of https://developers.google.com/+/mobile/android/getting-started
it create the PlusClient by
mPlusClient = new PlusClient.Builder(this, this, this)
.setVisibleActivities("XXXX/AddActivity", "XXXX/BuyActivity")
.setScopes("PLUS_LOGIN") // Space separated list of scopes
.build();
And in my own app, when I remove ".setScopes("PLUS_LOGIN")" and show as:
mPlusClient = new PlusClient.Builder(this, this, this)
.setVisibleActivities("XXXX/AddActivity", "XXXX/BuyActivity")
.build();
The error solved, wired!
This is too dumb but I have not found any information googling internet and groups. But it solved replacing:
//static final String[] SCOPES = new String[] { Scopes.PLUS_PROFILE, PLUS_WRITE_MOMENT };
static final String[] SCOPES = new String[] { Scopes.PLUS_PROFILE };
Seems the error occured because of PLUS_WRITE_MOMENT... I don't understand why, but without this it works.
I like google...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With