Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i create autofill when i recieve otp via sms. #54

Open
SukumarSmart opened this issue Apr 25, 2019 · 2 comments
Open

How can i create autofill when i recieve otp via sms. #54

SukumarSmart opened this issue Apr 25, 2019 · 2 comments

Comments

@SukumarSmart
Copy link

No description provided.

@gsmohan
Copy link

gsmohan commented May 18, 2019

@SukumarSmart First create a ref like below :
this.otpCodeRef = React.CreateRef()
<CodeInput ref={(value) => this.otpCodeRef = value} .... />

After reading the 4 digit OTP from the 3rd part module ( react-native-android-sms-listener )
const verificationCode = ''
const tmp = [...verificationCode]
this.otpCodeRef.setState({ codeArr: tmp, currentIndex: 3 })

@mohamed-ikram
Copy link

@gsmohan Thanks for the answer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants