faizalshap / react-native-otp-verify

React native sms verification without additional permissions
MIT License
239 stars 92 forks source link

Error: Missing Feature{name=sms_retrieve, version=1} #107

Closed SurajMohanty02 closed 6 months ago

SurajMohanty02 commented 6 months ago

I've tested it in emulator , i'm getting hash but not getting otp. Can you please help me ?

Code :- useEffect(() => { getHash().then(hash => { // use this hash in the message. console.log(hash,"hash") }).catch(console.log);

startOtpListener(message => { console.log(message,"message") // extract the otp using regex e.g. the below regex extracts 4 digit otp from message const otp = /(\d{4})/g.exec(message)[1]; console.log(otp);

});

return () => removeListener(); },[]);