Otp auto fill does not work
Describe the bug Otp received is not showing in keyboard to autofill
To Reproduce Steps to reproduce the behavior:
- Generate OTP
- OTP received is not shown in keyboard
Expected behavior Otp received should show in keyboard
Screenshots
Environment (please complete the following information):
- Device OS: Android
- Library version: 6.0.1
Hey, thank you for bringing this topic up! I investigated this issue, and it seems to me more of a problem of the OS (Android), cuz on iOS everything works fine (https://github.com/anday013/react-native-otp-entry/discussions/46#discussioncomment-9086914). May I ask you to follow these steps (https://www.reddit.com/r/AndroidQuestions/comments/tn5dfi/comment/i21lc4q/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button) and lmk the outcome?
@anday013 on android I checked with other apps, autofill suggestion for other apps is working
@manjunath-nuveb got it; I'll try to dig deeper into this question. Meanwhile, if you have any ideas or findings, share with me :)
@anday013 https://github.com/anday013/react-native-otp-entry/discussions/55
@anday013 when I copy the OTP by clicking on copy when I receive the message, it shows up in the suggestion.
@manjunath-nuveb is it a common flow on Android? Or it should pop up on top of the virtual keyboard automatically, without clicking copy button?
@anday013 In other android apps it is coming automatically without clicking on copy
@manjunath-nuveb strange... I found this source (https://developer.android.com/guide/topics/text/autofill-optimize#otp) and it's been applied: https://github.com/anday013/react-native-otp-entry/blob/main/src/OtpInput/OtpInput.tsx#L101
Yes, I saw this code in the source. this PR has the code https://github.com/anday013/react-native-otp-entry/pull/40 but it is not working.
@CarmineRumma Hi, could you please advice on this issue. A while ago, you had a similar one #40
@anday013 works on IOS device.
@manjunath-nuveb yep https://github.com/anday013/react-native-otp-entry/discussions/46#discussioncomment-9086914 :)
@CarmineRumma does autocomplete work for you on Android?
Does your text message have the hash code in the message body? as it's the way to associate the text message to the sms listener on the app. if it does and still not working, try this complimentary library - https://www.npmjs.com/package/react-native-otp-verify
Same issue on iOS as well. It used to work with v1.6.1
@vesparny I have just tested on the latest version, works fine
I close this issue due to inactivity, feel free to reopen it, if there is something else here