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

the plugin can only read SMS with a specific format? #25

Closed ZAHHAR-ISMAIL closed 3 years ago

ZAHHAR-ISMAIL commented 3 years ago

When I get a message, the TIMEOUT error appears. I heard that I have to put the hash code of the app? Is this necessary?


this.androidPermissions.checkPermission(this.androidPermissions.PERMISSION.READ_SMS).then(
        success => {
          console.log('Permission granted')
          this.androidPermissions.requestPermissions([this.androidPermissions.PERMISSION.READ_SMS]);
          this.smsRetriever.getAppHash()
            .then((res: any) => this.smsReadhash = res)
            .catch((error: any) => this.smsReadhash = "errorrrr " + error);
          this.smsRetriever.startWatching()
            .then((res: any) => this.smsRead = "done: " + res)
            .catch((error: any) => this.smsRead = "errorrrr " + error);
        },
        err => this.androidPermissions.requestPermission(this.androidPermissions.PERMISSION.READ_SMS)
      );