Google API for Java 示例代码(3)

@Override
  protected void onActivityResult(
      int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    switch (requestCode) {
      case REQUEST_AUTHENTICATE:
        if (resultCode == RESULT_OK) {
          gotAccount(false);
        } else {
          showDialog(DIALOG_ACCOUNTS);
        }
        break;
    }
  }

private void authenticatedClientLogin(String authToken) {
    this.authToken = authToken;
    ((GoogleHeaders) transport.defaultHeaders).setGoogleLogin(authToken);
    authenticated();
  }
}

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wwsgxf.html