コード例 #1
0
ファイル: GameHelper.java プロジェクト: amitkawasthi/CmoaQuiz
 /** Called when we are disconnected from the Google API client. */
 @Override
 public void onConnectionSuspended(int cause) {
   debugLog("onConnectionSuspended, cause=" + cause);
   disconnect();
   mSignInFailureReason = null;
   debugLog("Making extraordinary call to onSignInFailed callback");
   mConnecting = false;
   notifyListener(false);
 }
コード例 #2
0
ファイル: GameHelper.java プロジェクト: amitkawasthi/CmoaQuiz
  /**
   * Give up on signing in due to an error. Shows the appropriate error message to the user, using a
   * standard error dialog as appropriate to the cause of the error. That dialog will indicate to
   * the user how the problem can be solved (for example, re-enable Google Play Services, upgrade to
   * a new version, etc).
   */
  void giveUp(SignInFailureReason reason) {
    mConnectOnStart = false;
    disconnect();
    mSignInFailureReason = reason;

    if (reason.mActivityResultCode == GamesActivityResultCodes.RESULT_APP_MISCONFIGURED) {
      // print debug info for the developer
      GameHelperUtils.printMisconfiguredDebugInfo(mAppContext);
    }

    showFailureDialog();
    mConnecting = false;
    notifyListener(false);
  }