Created
March 23, 2018 22:24
-
-
Save adrianhall/e339d98a6cbe833e7cb78c349e4f4602 to your computer and use it in GitHub Desktop.
onClick handler for an authentication event
This file contains hidden or 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
fun onLockClicked(caller: View) { | |
Log.d(TAG, "Lock clicked - caller=${caller.id}") | |
if (AWSProvider.identityManager.isUserSignedIn) { | |
AWSProvider.identityManager.signOut() | |
mainToolbarLockIcon.setImageResource(R.drawable.ic_unlocked_24dp) | |
this.toast("Signed out of Amazon Cognito") | |
} else { | |
val intent = Intent(this, AuthenticatorActivity::class.java) | |
startActivity(intent) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment