1
이 플러그인 "Phonegap-SMS-reception-plugin"을 사용했지만 명령 프롬프트 나 수동으로 설치할 수 없습니다. 이 외에도 OTP 감지를위한 다른 플러그인을 찾을 수 없으며 하이브리드 모바일 앱에서 SMS의 데이터를 가져올 수 없습니다.cordova 플러그인을 사용하여 OTP를 검색하는 방법
이 플러그인 "Phonegap-SMS-reception-plugin"을 사용했지만 명령 프롬프트 나 수동으로 설치할 수 없습니다. 이 외에도 OTP 감지를위한 다른 플러그인을 찾을 수 없으며 하이브리드 모바일 앱에서 SMS의 데이터를 가져올 수 없습니다.cordova 플러그인을 사용하여 OTP를 검색하는 방법
해당 플러그인에 파일이 없습니다. 이 cordova-plugin-sms
<script type="text/javascript">
var body = "";
var address = "";
$(document).ready(function() {
if((/(ipad|iphone|ipod|android)/i.test(navigator.userAgent))) {
document.addEventListener('deviceready', initApp, false);
} else {
alert('need run on mobile device for full functionalities.');
}
});
function startWatch() { // start listening incoming sms
if(SMS) SMS.startWatch(function(){
alert('watching', 'watching started');
}, function(){
alert('failed to start watching');
});
}
function stopWatch() { // stop listening incoming sms
if(SMS) SMS.stopWatch(function(){
update('watching', 'watching stopped');
}, function(){
updateStatus('failed to stop watching');
});
}
function initApp() {
if (! SMS) { alert('SMS plugin not ready'); return; }
document.addEventListener('onSMSArrive', function(e){
var sms = e.data;
body = sms.body;
address = sms.address;
});
}
</script>
앱이 산들 바람에 부여 된 SMS를 읽기 권한이 있는지 확인하십시오.