protected void resolveUnsuccessfulConnectionResult ()
{
// Additional user input is needed
if (mConnectionResult.HasResolution) {
try {
mConnectionResult.StartResolutionForResult (Activity, REQUEST_CODE_RESOLVE_ERR);
} catch (IntentSender.SendIntentException) {
reconnect();
}
} else {
int errorCode = mConnectionResult.ErrorCode;
if (GooglePlayServicesUtil.IsUserRecoverableError (errorCode)) {
var dialog = GooglePlayServicesUtil.GetErrorDialog (errorCode, Activity, REQUEST_CODE_RESOLVE_ERR, this);
// the dialog will either be dismissed, which will invoke the OnCancelListener, or
// the dialog will be addressed, which will result in a callback to
// OnActivityResult()
dialog.Show ();
} else {
switch (errorCode) {
case ConnectionResult.InternalError:
case ConnectionResult.NetworkError:
reconnect();
break;
default:
handleError (errorCode);
break;
}
}
}
mConnectionResult = null;
}