Skip to content

Instantly share code, notes, and snippets.

@melikeeroglu
Last active September 30, 2020 06:14
Show Gist options
  • Save melikeeroglu/00adc087bc54ae9b614faef225f02ec3 to your computer and use it in GitHub Desktop.
Save melikeeroglu/00adc087bc54ae9b614faef225f02ec3 to your computer and use it in GitHub Desktop.
HiAnimals transmitTokenIntoAppGalleryConnect
private void transmitTokenIntoAppGalleryConnect(String accessToken) {
AGConnectAuthCredential credential = HwIdAuthProvider.credentialWithToken(accessToken);
AGConnectAuth.getInstance().signIn(credential).addOnSuccessListener(new OnSuccessListener<SignInResult>() {
@Override
public void onSuccess(SignInResult signInResult) {
startActivity(new Intent(MainActivity.this, HomePageActivity.class));
finish();
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(Exception e) {
Log.d(TAG, "Error " + e);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment