Created
September 30, 2020 06:12
-
-
Save melikeeroglu/29556798a9833e166199404fdf5b3032 to your computer and use it in GitHub Desktop.
HiAnimals onActivityResult
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void onActivityResult(int requestCode, int resultCode, Intent data) { | |
super.onActivityResult(requestCode, resultCode, data); | |
if (requestCode == 1001) { | |
Task<AuthHuaweiId> authHuaweiIdTask = HuaweiIdAuthManager.parseAuthResultFromIntent(data); | |
if (authHuaweiIdTask.isSuccessful()) { | |
AuthHuaweiId huaweiAccount = authHuaweiIdTask.getResult(); | |
Log.i(TAG, "signIn success Access Token = " + huaweiAccount.getAccessToken()); | |
Log.i(TAG, "signIn success User Name = " + huaweiAccount.getDisplayName()); | |
} | |
else { | |
Log.i(TAG, "signIn failed: " + ((ApiException) authHuaweiIdTask.getException()).getStatusCode()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment