Last active
April 27, 2024 12:06
-
-
Save criminact/80c8b5ac8a89ebfd3785586c7db4a684 to your computer and use it in GitHub Desktop.
OTPView completion listener implementation
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
| var otpView = findViewById<OTPView>(R.id.otpView) | |
| otpView.setOTPListener(object : OTPView.OTPListener { | |
| override fun onOTPCompleted(otp: String) { | |
| Toast.makeText(this@MainActivity, "OTP Completed $otp", Toast.LENGTH_LONG).show() | |
| if(otp == "123456"){ | |
| otpView.showSuccess() | |
| }else{ | |
| otpView.showFailure() | |
| } | |
| } | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment