本文整理汇总了Java中com.google.android.gms.games.GamesClient.STATUS_MATCH_ERROR_LOCALLY_MODIFIED属性的典型用法代码示例。如果您正苦于以下问题:Java GamesClient.STATUS_MATCH_ERROR_LOCALLY_MODIFIED属性的具体用法?Java GamesClient.STATUS_MATCH_ERROR_LOCALLY_MODIFIED怎么用?Java GamesClient.STATUS_MATCH_ERROR_LOCALLY_MODIFIED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.google.android.gms.games.GamesClient
的用法示例。
在下文中一共展示了GamesClient.STATUS_MATCH_ERROR_LOCALLY_MODIFIED属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkStatusCode
private boolean checkStatusCode(TurnBasedMatch match, int statusCode) {
switch (statusCode) {
case GamesClient.STATUS_OK:
return true;
case GamesClient.STATUS_NETWORK_ERROR_OPERATION_DEFERRED:
// This is OK; the action is stored by Google Play Services and will
// be dealt with later.
return true;
case GamesClient.STATUS_MULTIPLAYER_ERROR_NOT_TRUSTED_TESTER:
showErrorMessage(match, statusCode,
R.string.status_multiplayer_error_not_trusted_tester);
break;
case GamesClient.STATUS_MATCH_ERROR_ALREADY_REMATCHED:
showErrorMessage(match, statusCode,
R.string.match_error_already_rematched);
break;
case GamesClient.STATUS_NETWORK_ERROR_OPERATION_FAILED:
showErrorMessage(match, statusCode,
R.string.network_error_operation_failed);
break;
case GamesClient.STATUS_CLIENT_RECONNECT_REQUIRED:
showErrorMessage(match, statusCode,
R.string.client_reconnect_required);
break;
case GamesClient.STATUS_INTERNAL_ERROR:
showErrorMessage(match, statusCode, R.string.internal_error);
break;
case GamesClient.STATUS_MATCH_ERROR_INACTIVE_MATCH:
showErrorMessage(match, statusCode,
R.string.match_error_inactive_match);
break;
case GamesClient.STATUS_MATCH_ERROR_LOCALLY_MODIFIED:
showErrorMessage(match, statusCode,
R.string.match_error_locally_modified);
break;
default:
showErrorMessage(match, statusCode, R.string.unexpected_status);
PygmyApp.logD("Did not have warning or string to deal with: "
+ statusCode);
}
return false;
}
示例2: checkStatusCode
private boolean checkStatusCode(TurnBasedMatch match, int statusCode) {
switch (statusCode) {
case GamesClient.STATUS_OK:
return true;
case GamesClient.STATUS_NETWORK_ERROR_OPERATION_DEFERRED:
// This is OK; the action is stored by Google Play Services and will
// be dealt with later.
Toast.makeText(
this,
"Stored action for later. (Please remove this toast before release.)",
Toast.LENGTH_LONG).show();
// NOTE: This toast is for informative reasons only; please remove
// it from your final application.
return true;
case GamesClient.STATUS_MULTIPLAYER_ERROR_NOT_TRUSTED_TESTER:
showErrorMessage(match, statusCode,
R.string.status_multiplayer_error_not_trusted_tester);
break;
case GamesClient.STATUS_MATCH_ERROR_ALREADY_REMATCHED:
showErrorMessage(match, statusCode,
R.string.match_error_already_rematched);
break;
case GamesClient.STATUS_NETWORK_ERROR_OPERATION_FAILED:
showErrorMessage(match, statusCode,
R.string.network_error_operation_failed);
break;
case GamesClient.STATUS_CLIENT_RECONNECT_REQUIRED:
showErrorMessage(match, statusCode,
R.string.client_reconnect_required);
break;
case GamesClient.STATUS_INTERNAL_ERROR:
showErrorMessage(match, statusCode, R.string.internal_error);
break;
case GamesClient.STATUS_MATCH_ERROR_INACTIVE_MATCH:
showErrorMessage(match, statusCode,
R.string.match_error_inactive_match);
break;
case GamesClient.STATUS_MATCH_ERROR_LOCALLY_MODIFIED:
showErrorMessage(match, statusCode,
R.string.match_error_locally_modified);
break;
default:
showErrorMessage(match, statusCode, R.string.unexpected_status);
Log.d(TAG, "Did not have warning or string to deal with: "
+ statusCode);
}
return false;
}