I am developing the ionic4 app, to auto verification or whenever I will get SMS my app has to read that message. for this I used 'Cordova plugin add Cordova-plugin-SMS' but it is not working. i declared 'declare var window: any; and declare var SMS: any;' nothing has worked. it showing "java.lang.ClassNotFoundException: com.rjfun.cordova.sms.SMSPlugin" in Android, in the web while developing it showing " TypeError: Cannot read property 'listSMS' of undefined". can any one help me to solve this issue
Few things to be kept in mind while implementing the auto read functionality by using Web OTP API. The Web OTP API requires HTTPS origin, that is on HTTP website this functionality will not work. This functionality will work only on the chrome 84 or later on an Android device.
There is one plugin which could solve your problem. Named cordova-plugin-sms-receive. This will help to read sms when any phone received and you can do whatever you want. https://www.npmjs.com/package/cordova-plugin-sms-receive
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With