Why blockingConnect method of GoogleApiClient returns ConnectionResult.CANCELED while during the same call I get ConnectionResult.SIGN_IN_REQUIRED from OnConnectionFailedListener?
I think that blockingConnect method should return the same ConnetionResult as in the OnConnectionFailedListener.onConnectionFailed.
Is this is a bug in GoogleApiClient?
Below is a sample code (should be executed in background thread).
GoogleApiClient googleApiClient = new GoogleApiClient.Builder(LoginActivity.this)
.addApi(Plus.API)
.addScope(Plus.SCOPE_PLUS_LOGIN)
.addOnConnectionFailedListener(new GoogleApiClient.OnConnectionFailedListener() {
@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
}
})
.build();
ConnectionResult connectionResult = googleApiClient.blockingConnect(30, TimeUnit.SECONDS);
I'm using 'com.google.android.gms:play-services-plus:7.3.0'