当前位置: 首页>>代码示例>>Java>>正文


Java GamesClient.STATUS_MATCH_ERROR_LOCALLY_MODIFIED属性代码示例

本文整理汇总了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;
}
 
开发者ID:elyas-bhy,项目名称:pygmy,代码行数:42,代码来源:GameHelper.java

示例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;
}
 
开发者ID:dustin-graham,项目名称:MorseWithPals,代码行数:49,代码来源:MainActivity.java


注:本文中的com.google.android.gms.games.GamesClient.STATUS_MATCH_ERROR_LOCALLY_MODIFIED属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。