android - Why blockingConnect method of GoogleApiClient returns ConnectionResult.CANCELED? -
why blockingconnect method of googleapiclient returns connectionresult.canceled while during same call connectionresult.sign_in_required onconnectionfailedlistener?
i think blockingconnect method should return same connetionresult in onconnectionfailedlistener.onconnectionfailed.
is bug in googleapiclient?
below sample code (should 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'
had problem well. i`ve fugired out far. blockingconnect method returns success, when explicitly set account name when build googleapiclient. otherwise returns canceled. however, nll mentioned in comment, blockingconnect returns sign_in_required in earlier play services versions, version 6.5.87 in particular, can try using version.
Comments
Post a Comment