hanatharesh2712 / ionic-native-sms-retriever-plugin-master

Cross-platform plugin for Cordova / PhoneGap to Retrieve SMS. Available for Android.
27 stars 18 forks source link

SMS is not reading #6

Closed Ram12393 closed 3 years ago

Ram12393 commented 5 years ago

I successfully installed this plugin in my ionic application, I tried to use the read SMS, but unfortunately, it is not reading any SMS. could you help me with this regard

hanatharesh2712 commented 5 years ago

Are you sending SMS with your hash code with below format?

<#> Your ExampleApp code is: 123ABC78 YOUR_HASH_CODE_HERE

e.g: <#> Your ExampleApp code is: 123ABC78 FA+9qCX9VSu

PunitSaharan commented 4 years ago

i am using this following code its not working in ionic 4..i got App Hash that code working fine but reading sms code not working.

ngOnInit() {

    this.start();
  }

start() {

  this.smsRetriever.startWatching()
  .then((res: any) => alert(res))
  .catch((error: any) => alert(error));

  }

i tried to set alert but not alert come either on response or error.

My sms Template is also same as u mentioned : <#> Your ExampleApp code is: 123ABC78 FA+9qCX9VSu

hanatharesh2712 commented 4 years ago

Wait fot 5 minutes after start watching function. You will get timeout error. And make sure that you are sending sms with your app hash string

hanatharesh2712 commented 3 years ago

closing as no response for a while