本文整理匯總了C#中Android.StartResolutionForResult方法的典型用法代碼示例。如果您正苦於以下問題:C# Android.StartResolutionForResult方法的具體用法?C# Android.StartResolutionForResult怎麽用?C# Android.StartResolutionForResult使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Android
的用法示例。
在下文中一共展示了Android.StartResolutionForResult方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: OnConnectionFailed
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();
}
}
示例2: OnConnectionFailed
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);
}
}
示例3: OnConnectionFailed
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 ();
}
}