Skip to content

Instantly share code, notes, and snippets.

@TobiAlbert
Created June 20, 2020 04:11
Show Gist options
  • Save TobiAlbert/63f4cc11f8952f724b79704a6f390ef4 to your computer and use it in GitHub Desktop.
Save TobiAlbert/63f4cc11f8952f724b79704a6f390ef4 to your computer and use it in GitHub Desktop.
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
when (requestCode) {
REQUEST_SMS_CONSENT -> {
if (resultCode == Activity.RESULT_OK) {
data?.let {
val message = it.getStringExtra(SmsRetriever.EXTRA_SMS_MESSAGE)
parseMessageForOtp(message)
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment