faizalshap / react-native-otp-verify

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

not working on android 13 samsung device #102

Open aarie33 opened 9 months ago

aarie33 commented 9 months ago

I am using a Samsung A52S with Android 13 My code cannot identify the received SMS. I tried with a lower Android version (Android 9) and works well. Any solution for this issue? Thank you in advance

Version :

"react-native": "0.69.0",
"react-native-otp-verify": "^1.1.6",

Here is my code

import {
  getHash,
  startOtpListener,
  removeListener,
  useOtpVerify,
} from 'react-native-otp-verify';

useEffect(() => {
    getHash().then(hash => {
      console.log('hash sms :', hash);
      console.log(hash);
    }).catch(console.log);

    startOtpListener(message => {
      console.log('message startOtpListener');
      console.log(message);

      const smsOtp = /(\d{6})/g.exec(message)![1];

      console.log('smsOtp: ', smsOtp);
    })

    return () => removeListener();
  }, []);
pushpender-singh-ap commented 8 months ago

Can you share sample repo with video sample.