public void OnConnectionFailed(Android.Gms.Common.ConnectionResult result) { if (apiClientResolvingError) { return; } if (result.HasResolution) { try { apiClientResolvingError = true; result.StartResolutionForResult(this, ConnectionFailureResolutionRequest); } catch (Android.Content.IntentSender.SendIntentException) { client.Connect(); } } else { var args = new Bundle(); args.PutInt(DialogError, result.ErrorCode); var dialogFragment = new ErrorDialogFragment() { Arguments = args }; dialogFragment.Show(SupportFragmentManager, "errordialog"); } }
public void OnConnectionFailed(Android.Gms.Common.ConnectionResult result) { mMomentListView.Adapter = null; if (mResolvingError) { return; } try { result.StartResolutionForResult(this, REQUEST_CODE_SIGN_IN); mResolvingError = true; } catch (IntentSender.SendIntentException e) { // Reconnect to get another intent to start. mGoogleApiClient.Connect(); } }
public void OnConnectionFailed(Android.Gms.Common.ConnectionResult result) { if (mResolvingError) { return; } mPersonListView.Adapter = null; try { result.StartResolutionForResult(this, REQUEST_CODE_SIGN_IN); mResolvingError = true; } catch (IntentSender.SendIntentException ex) { // Get another pending intent to run. mGoogleApiClient.Connect(); } }
public void OnConnectionFailed(Android.Gms.Common.ConnectionResult result) { mInProgress = false; // If the error has a resolution, start a Google Play services activity to resolve it if (result.HasResolution) { try { result.StartResolutionForResult(this, Constants.CONNECTION_FAILURE_RESOLUTION_REQUEST); } catch (Exception ex) { Log.Error(Constants.TAG, "Exception while resolving connection error.", ex); } } else { int errorCode = result.ErrorCode; Log.Error(Constants.TAG, "Connection to Google Play services failed with error code " + errorCode); } }