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


Java BaseGameUtils.resolveConnectionFailure方法代码示例

本文整理汇总了Java中com.google.example.games.basegameutils.BaseGameUtils.resolveConnectionFailure方法的典型用法代码示例。如果您正苦于以下问题:Java BaseGameUtils.resolveConnectionFailure方法的具体用法?Java BaseGameUtils.resolveConnectionFailure怎么用?Java BaseGameUtils.resolveConnectionFailure使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.example.games.basegameutils.BaseGameUtils的用法示例。


在下文中一共展示了BaseGameUtils.resolveConnectionFailure方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onConnectionFailed

import com.google.example.games.basegameutils.BaseGameUtils; //导入方法依赖的package包/类
@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
  Log.d(TAG, "onConnectionFailed() called, result: " + connectionResult);

  if (mResolvingConnectionFailure) {
    Log.d(TAG, "onConnectionFailed() ignoring connection failure; already resolving.");
    return;
  }

  if (mSignInClicked || mAutoStartSignInFlow) {
    mAutoStartSignInFlow = false;
    mSignInClicked = false;
    mResolvingConnectionFailure = BaseGameUtils.resolveConnectionFailure(this, mGoogleApiClient,
        connectionResult, RC_SIGN_IN, getString(R.string.signin_other_error));
  }

  switchToScreen(R.id.screen_sign_in);
}
 
开发者ID:ezet,项目名称:penguins-in-space,代码行数:19,代码来源:Example.java

示例2: onConnectionFailed

import com.google.example.games.basegameutils.BaseGameUtils; //导入方法依赖的package包/类
@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
    if (mResolvingConnectionFailure) {
        return;
    }

    if (mGoogleApiClient != null && (mSignInClicked || mAutoStartSignInflow)) {
        mSignInClicked = false;
        mAutoStartSignInflow = false;

        mResolvingConnectionFailure = BaseGameUtils.resolveConnectionFailure(this, mGoogleApiClient, connectionResult, RC_SIGN_IN, getString(R.string.sign_in_failure));
    } else {
        //add sign in button
        findViewById(R.id.signin).setVisibility(View.VISIBLE);
        findViewById(R.id.progress).setVisibility(View.GONE);
        findViewById(R.id.achv).setVisibility(View.GONE);
        findViewById(R.id.scoreboard).setVisibility(View.GONE);
    }
}
 
开发者ID:TheAndroidMaster,项目名称:Rocket,代码行数:20,代码来源:MainActivity.java

示例3: onConnectionFailed

import com.google.example.games.basegameutils.BaseGameUtils; //导入方法依赖的package包/类
@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
    if (mResolvingConnectionFailure) {
        return;
    }

    if (mSignInClicked || mAutoStartSignInflow) {
        mSignInClicked = false;
        mAutoStartSignInflow = false;

        mResolvingConnectionFailure = BaseGameUtils.resolveConnectionFailure(this, mGoogleApiClient, connectionResult, RC_SIGN_IN, "Sign-in failed");
    } else {
        //remove sign out button - user is not signed in
        findViewById(R.id.signout).setVisibility(View.GONE);
    }
}
 
开发者ID:TheAndroidMaster,项目名称:Rocket,代码行数:17,代码来源:OptionsActivity.java

示例4: onConnectionFailed

import com.google.example.games.basegameutils.BaseGameUtils; //导入方法依赖的package包/类
/**
 * Attempt to reconnect to play services, or display error if connection fails.
 *
 * @param connectionResult
 */
@Override
public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
    if (mResolvingConnectionFailure) {
        // already resolving
        return;
    }

    // if the sign-in button was clicked or if auto sign-in is enabled,
    // launch the sign-in flow
    if (mSignInClicked || mAutoStartSignInFlow) {
        mAutoStartSignInFlow = false;
        mSignInClicked = false;
        mResolvingConnectionFailure = true;

        // Attempt to resolve the connection failure using BaseGameUtils.
        // The R.string.signin_other_error value should reference a generic
        // error string in your strings.xml file, such as "There was
        // an issue with sign-in, please try again later."
        if (!BaseGameUtils.resolveConnectionFailure(this,
                mGoogleApiClient, connectionResult,
                RC_SIGN_IN, String.valueOf(R.string.signin_other_error))) {
            mResolvingConnectionFailure = false;
        }
    }
}
 
开发者ID:BloopApp,项目名称:Bloop,代码行数:31,代码来源:PlayLoginActivity.java

示例5: onConnectionFailed

import com.google.example.games.basegameutils.BaseGameUtils; //导入方法依赖的package包/类
@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
    Log.d(TAG, "onConnectionFailed(): attempting to resolve");
    if (mResolvingConnectionFailure) {
        Log.d(TAG, "onConnectionFailed(): already resolving");
        return;
    }

    if (mSignInClicked || mAutoStartSignInFlow) {
        mAutoStartSignInFlow = false;
        mSignInClicked = false;
        mResolvingConnectionFailure = true;
        if (!BaseGameUtils.resolveConnectionFailure(this, mGoogleApiClient, connectionResult,
                RC_SIGN_IN, getString(R.string.signin_other_error))) {
            mResolvingConnectionFailure = false;
        }
    }

    // Sign-in failed, so show sign-in button on main menu
    mMainMenuFragment.setGreeting(getString(R.string.signed_out_greeting));
    mMainMenuFragment.setShowSignInButton(true);
    mWinFragment.setShowSignInButton(true);
}
 
开发者ID:NahroTo,项目名称:Fruit-Destroyer,代码行数:24,代码来源:MainActivity.java

示例6: onConnectionFailed

import com.google.example.games.basegameutils.BaseGameUtils; //导入方法依赖的package包/类
@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
    Log.d(TAG, "onConnectionFailed() called, result: " + connectionResult);

    if (mResolvingConnectionFailure) {
        Log.d(TAG, "onConnectionFailed() ignoring connection failure; already resolving.");
        return;
    }

    if (mSignInClicked || mAutoStartSignInFlow) {
        mAutoStartSignInFlow = false;
        mSignInClicked = false;
        mResolvingConnectionFailure = BaseGameUtils
                .resolveConnectionFailure(this, mGoogleApiClient,
                        connectionResult, RC_SIGN_IN, getString(R.string.signin_other_error));
    }
    showSignInBar();
}
 
开发者ID:NahroTo,项目名称:Fruit-Destroyer,代码行数:19,代码来源:BeGenerousActivity.java

示例7: onConnectionFailed

import com.google.example.games.basegameutils.BaseGameUtils; //导入方法依赖的package包/类
@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
    Log.d(TAG, "onConnectionFailed(): attempting to resolve");
    if (mResolvingConnectionFailure) {
        // Already resolving
        Log.d(TAG, "onConnectionFailed(): ignoring connection failure, already resolving.");
        return;
    }

    // Launch the sign-in flow if the button was clicked or if auto sign-in is enabled
    if (mSignInClicked || mAutoStartSignInFlow) {
        mAutoStartSignInFlow = false;
        mSignInClicked = false;

        mResolvingConnectionFailure = BaseGameUtils.resolveConnectionFailure(this,
                mGoogleApiClient, connectionResult, RC_SIGN_IN,
                getString(R.string.signin_other_error));
    }

    setViewVisibility();
}
 
开发者ID:NahroTo,项目名称:Fruit-Destroyer,代码行数:22,代码来源:SkeletonActivity.java

示例8: onConnectionFailed

import com.google.example.games.basegameutils.BaseGameUtils; //导入方法依赖的package包/类
@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
    Log.d(TAG, "onConnectionFailed(): attempting to resolve");
    if (mResolvingConnectionFailure) {
        Log.d(TAG, "onConnectionFailed(): already resolving, ignoring");
        return;
    }

    if (mSignInClicked || mAutoStartSignInFlow) {
        mAutoStartSignInFlow = false;
        mSignInClicked = false;
        mResolvingConnectionFailure = true;
        if (!BaseGameUtils.resolveConnectionFailure(this, mGoogleApiClient, connectionResult,
                RC_SIGN_IN, getString(R.string.signin_other_error))) {
            mResolvingConnectionFailure = false;
        }
    }
    showSignInBar();
}
 
开发者ID:NahroTo,项目名称:Fruit-Destroyer,代码行数:20,代码来源:MainActivity.java

示例9: onConnectionFailed

import com.google.example.games.basegameutils.BaseGameUtils; //导入方法依赖的package包/类
@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
  Log.d(TAG, "onConnectionFailed() called, result: " + connectionResult);

  if (mResolvingConnectionFailure) {
    Log.d(TAG, "onConnectionFailed() ignoring connection failure; already resolving.");
    return;
  }

  if (mSignInClicked || mAutoStartSignInFlow) {
    mAutoStartSignInFlow = false;
    mSignInClicked = false;
    mResolvingConnectionFailure = BaseGameUtils.resolveConnectionFailure(this, mGoogleApiClient,
        connectionResult, RC_SIGN_IN, getString(R.string.signin_other_error));
  }
  showSignInBar();
}
 
开发者ID:NahroTo,项目名称:Fruit-Destroyer,代码行数:18,代码来源:MainActivity.java

示例10: onConnectionFailed

import com.google.example.games.basegameutils.BaseGameUtils; //导入方法依赖的package包/类
@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
    Log.d(TAG, "onConnectionFailed");
    if (mIsResolving) {
        // The application is attempting to resolve this connection failure already.
        Log.d(TAG, "onConnectionFailed: already resolving");
        return;
    }

    if (mSignInClicked || mAutoStartSignIn) {
        mSignInClicked = false;
        mAutoStartSignIn = false;

        // Attempt to resolve the connection failure.
        Log.d(TAG, "onConnectionFailed: begin resolution.");
        mIsResolving = BaseGameUtils.resolveConnectionFailure(this, mGoogleApiClient,
                connectionResult, RC_SIGN_IN, getString(R.string.signin_other_error));
    }

    updateUI();
}
 
开发者ID:NahroTo,项目名称:Fruit-Destroyer,代码行数:22,代码来源:MainActivity.java

示例11: onConnectionFailed

import com.google.example.games.basegameutils.BaseGameUtils; //导入方法依赖的package包/类
@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
    if (mResolvingConnectionFailure) {
        // Already resolving
        return;
    }

    // If the sign in button was clicked or if auto sign-in is enabled,
    // launch the sign-in flow
    if (mSignInClicked || mAutoStartSignInFlow) {
        mAutoStartSignInFlow = false;
        mSignInClicked = false;
        mResolvingConnectionFailure = true;

        // Attempt to resolve the connection failure using BaseGameUtils.
        // The R.string.signin_other_error value should reference a generic
        // error string in your strings.xml file, such as "There was
        // an issue with sign in, please try again later."
        if (!BaseGameUtils.resolveConnectionFailure(this,
                mGoogleApi, connectionResult,
                RC_SIGN_IN, getString(R.string.signin_other_error))) {
            mResolvingConnectionFailure = false;
        }
    }

}
 
开发者ID:hypeapps,项目名称:FixMath,代码行数:27,代码来源:SettingsActivity.java

示例12: onConnectionFailed

import com.google.example.games.basegameutils.BaseGameUtils; //导入方法依赖的package包/类
@Override
public void onConnectionFailed(@NonNull ConnectionResult result) {
  Log.d(TAG, "onConnectionFailed(): attempting to resolve");
  if (resolvingError) {
    // Already resolving
    Log.d(TAG, "onConnectionFailed(): ignoring connection failure, already resolving.");
    return;
  }
  updateFromConnectionStatus();

  // Launch the sign-in flow if the button was clicked or if auto sign-in is enabled
  if (signInClicked || autoStartSignInFlow) {
    autoStartSignInFlow = false;
    signInClicked = false;

    resolvingError = BaseGameUtils.resolveConnectionFailure(this, googleApiClient, result,
        RC_SIGN_IN, getString(R.string.signin_other_error));
  }
}
 
开发者ID:cauchymop,项目名称:goblob,代码行数:20,代码来源:MainActivity.java

示例13: onConnectionFailed

import com.google.example.games.basegameutils.BaseGameUtils; //导入方法依赖的package包/类
@Override
public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
    achievementsView.setVisibility(View.GONE);
    rankView.setVisibility(View.GONE);
    gamesView.setVisibility(View.GONE);
    BaseGameUtils.resolveConnectionFailure(this, apiClient, connectionResult, 1801, R.string.msg_sign_in_error);
}
 
开发者ID:TheAndroidMaster,项目名称:Asteroid,代码行数:8,代码来源:MainActivity.java

示例14: onConnectionFailed

import com.google.example.games.basegameutils.BaseGameUtils; //导入方法依赖的package包/类
@Override
public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
    if (mResolvingConnectionFailure) {
        return;
    }

    if (mSignInClicked || mAutoStartSignInflow) {
        mSignInClicked = false;
        mAutoStartSignInflow = false;

        mResolvingConnectionFailure = BaseGameUtils.resolveConnectionFailure(this, mGoogleApiClient, connectionResult, RC_SIGN_IN, getString(R.string.sign_in_failure));
    }
}
 
开发者ID:TheAndroidMaster,项目名称:Rocket,代码行数:14,代码来源:FlappyActivity.java

示例15: onConnectionFailed

import com.google.example.games.basegameutils.BaseGameUtils; //导入方法依赖的package包/类
@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
    if (mResolvingConnectionFailure) {
        // Already resolving
        return;
    }

    // If the sign in button was clicked or if auto sign-in is enabled,
    // launch the sign-in flow
    if (mSignInClicked || mAutoStartSignInFlow) {
        mAutoStartSignInFlow = false;
        mSignInClicked = false;
        mResolvingConnectionFailure = true;

        // Attempt to resolve the connection failure using BaseGameUtils.
        // The R.string.signin_other_error value should reference a generic
        // error string in your strings.xml file, such as "There was
        // an issue with sign in, please try again later."
        if (!BaseGameUtils.resolveConnectionFailure(this,
                googleApiClient, connectionResult,
                RC_SIGN_IN, getString(R.string.signin_other_error))) {
            mResolvingConnectionFailure = false;
        }
    }




}
 
开发者ID:hypeapps,项目名称:FixMath,代码行数:30,代码来源:PlayActivity.java


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