public void OnConnectionFailed(Android.Gms.Common.ConnectionResult result) { if (mResolvingError) { // Already attempting to resolve an error return; } else if (result.HasResolution) { try { mResolvingError = true; result.StartResolutionForResult(this, RequestResolveError); } catch (IntentSender.SendIntentException e) { // There was an error with the resolution intent. Try again. mGoogleApiClient.Connect(); } } else { Log.Error(Tag, "Connection to Google API client has failed"); mResolvingError = false; startActivityBtn.Enabled = false; sendPhotoBtn.Enabled = false; WearableClass.DataApi.RemoveListener(mGoogleApiClient, this); WearableClass.MessageApi.RemoveListener(mGoogleApiClient, this); WearableClass.NodeApi.RemoveListener(mGoogleApiClient, this); } }
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(); } }