In my app I'm using the PlusOneButton and I simulated an automatic click on the actual button - to save the user one more click. For users that aren't signed in with their Google account the next screen that will be displayed is the builtin google dialog to choose an account.
Occasionally, the app crashes when it reaches this phase - I see the following lines in the log
1378-3640/? I/GLSUser﹕ [GLSUser] getTokenFromCache: [account: <ELLIDED:2885>, callingPkg: com.google.android.gms, service: oauth2:https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/pos]
1378-3640/? I/Auth.Core﹕ [TokenCache] Missing snowballing token: no granted scopes set.
1378-3640/? I/GLSUser﹕ [GLSUser] getTokenFromGoogle [account: <ELLIDED:2885>, callingPkg: com.google.android.gms, service: oauth2:https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/pos
6376-6376/com.myapp.android D/AndroidRuntime﹕ Shutting down VM
6376-6376/com.myapp.android W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41fced40)
6376-6376/com.myapp.android I/Process﹕ Sending signal. PID: 6376 SIG: 9
it seems that the crash happens after this line is written
[GLSUser] getTokenFromGoogle [account: <ELLIDED:2885>, callingPkg: com.google.android.gms, service: oauth2:https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/pos
because I don't see it in the log when there are no crashes.
Right now it seems that disabling the automatic click solves the problem - any idea what can be done to enable this automatic click?
The answer to my question is built of 2 parts