Skip to content

Instantly share code, notes, and snippets.

@bengongon97
Last active July 20, 2020 10:24
Show Gist options
  • Save bengongon97/dea4131faa27c48365522d4b2e7f48f0 to your computer and use it in GitHub Desktop.
Save bengongon97/dea4131faa27c48365522d4b2e7f48f0 to your computer and use it in GitHub Desktop.
MainActivity snippet for SignIn with Account Kit
binding.signInWithHuaweiButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
mHuaweiIdAuthParams = new HuaweiIdAuthParamsHelper(HuaweiIdAuthParams.DEFAULT_AUTH_REQUEST_PARAM)
.setIdToken()
.setAccessToken()
.createParams();
HuaweiIdAuthService mHuaweiIdAuthService = HuaweiIdAuthManager.getService (LoginActivity.this, mHuaweiIdAuthParams);
startActivityForResult(mHuaweiIdAuthService.getSignInIntent(), REQUEST_SIGN_IN_LOGIN);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment