Hey,
I am building an ionic app which receives one time password via SMS. I want to auto detect that password. how can i do that?
Thanks.
Hey,
I am building an ionic app which receives one time password via SMS. I want to auto detect that password. how can i do that?
Thanks.
i tried this things but it is not working
Below is my code which is working fine, It waits for OTP to receive and as soon as its received it reads that OTP.
if(cordova != undefined){
var smsInboxPlugin = cordova.require('cordova/plugin/smsinboxplugin');
smsInboxPlugin.isSupported (function(supported) {
if(supported){
smsInboxPlugin.startReception (function(msg) {
$scope.input.code = msg;
$scope.safeApply();
$scope.verify();
// We got sms, now stop receptor
smsInboxPlugin.stopReception(function(){
});
});
}else{
helper.popup("Notice","Please enter OTP you received");
}
});
}
var smsInboxPlugin = cordova.require(‘src/org/apache/cordova/plugin/SmsInboxPlugin’);
smsInboxPlugin.isSupported ((function(supported) {
if(supported)
alert(“SMS supported !”);
else
alert(“SMS not supported”);
}), function(error) {
alert(error);// i am getting error here class not found
});
Sorry i read your reply today, did you solved it ?
var smsInboxPlugin = cordova.require(‘cordova/plugin/smsinboxplugin’);
I got error here
Whats the error text ? Be descriptive so others reading can help you as well.
532076 error module cordova/plugin/smsinboxplugin not found
I got only This error
platforms\android\src\org\apache\cordova\plugin
this is my plugin path
0 256867 error Uncaught ReferenceError: cordova is not defined, htt
p://192.168.5.13:8100/js/SmsInboxPlugin.js, Line: 23
0 257188 error Uncaught ReferenceError: cordova is not defined, htt
p://192.168.5.13:8100/js/SmsInboxPlugin.js, Line: 23
You can use this plugin by Sandeep Dillerao https://www.npmjs.com/package/cordova-plugin-otp-auto-verification