andreyvital / react-native-android-sms-listener

Allows you to listen for incoming SMS messages using React Native
MIT License
355 stars 99 forks source link

Issue: Violation of Permissions policy From Google Playstore #48

Open jerryheir opened 4 years ago

jerryheir commented 4 years ago

I used this awesome package and since it did not work on newer versions of Android unless you ask for user permissions. After asking for permissions this way

    async requestReadSmsPermission() {
      try {
      var granted = await PermissionsAndroid.request(
      PermissionsAndroid.PERMISSIONS.READ_SMS,
      {
      title: "Auto Verification OTP",
      message: "need access to read sms, to verify OTP"
      }
      );
      if (granted === PermissionsAndroid.RESULTS.GRANTED) {
      console.log("sms read permissions granted", granted); 
      granted = await PermissionsAndroid.request( 
      PermissionsAndroid.PERMISSIONS.RECEIVE_SMS,{ 
      title: "Receive SMS",
      message: "Need access to receive sms, to verify OTP"
      }
      );
      if (granted === PermissionsAndroid.RESULTS.GRANTED) {
      console.log("RECEIVE_SMS permissions granted", granted);
      } else {
      console.log("RECEIVE_SMS permissions denied");
      }
      } else {
      console.log("sms read permissions denied");
      }
      } catch (err) {
      console.log(err);
      }
    }

Everything worked wonderfully well till I tried to submit the app and then Google Review sent this

Publishing status: Rejected
After review, your app has been rejected and wasn't published due to a policy violation. If you submitted an update, the previous version of your app is still available on Google Play. 

Issue: Violation of Permissions policy
--
After reviewing your app, we found that it doesn’t qualify to use the requested permissions

What do I do please

lyngbach commented 4 years ago

Google have restricted use of SMS/CallLog functionality and you need to be approved through their declaration form for such permission usage.

More info and links here: https://support.google.com/googleplay/android-developer/answer/9047303

jerryheir commented 4 years ago

So what do we do now? How can we add this to a build that should go on the Google Play Store?

On Tue, Oct 15, 2019, 1:36 PM Rune Lyngbach Jensen notifications@github.com wrote:

Google have restricted use of SMS/CallLog functionality and you need to be approved through their declaration form for such permission usage.

More info and links here: https://support.google.com/googleplay/android-developer/answer/9047303

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/andreyvital/react-native-android-sms-listener/issues/48?email_source=notifications&email_token=AHDHZJ6TLWUEN6UPOALMQB3QOW2LJA5CNFSM4IY4BPYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBISPSY#issuecomment-542189515, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHDHZJYY6TUJAETWYCGMJITQOW2LJANCNFSM4IY4BPYA .

lyngbach commented 4 years ago

You submit a form in the Google Play console declaring the intent of your permission requests for your app and Google either approve or decline your form request (you can request multiple times I believe).

But the main thing to keep in mind here is that your app core functionality has to be related to the permissions your are requesting with a few exceptions. but basicily if you use READ_SMS to some UX improvement it is most likely not enough to get approved sadly. It has to be something like "the app wont work and there is no work around" situation before it has a chance to be approved.

Check this link which describe in more details about the declaration form step process: https://support.google.com/googleplay/android-developer/answer/9214102?hl=en

jerryheir commented 4 years ago

Thanks for the tip!

On Tue, Oct 15, 2019 at 3:23 PM Rune Lyngbach Jensen < notifications@github.com> wrote:

You submit a form in the Google Play console declaring the intent of your permission requests for your app and Google either approve or decline your form request (you can request multiple times I believe).

But the main thing to keep in mind here is that your app core functionality has to be related to the permissions your are requesting with a few exceptions. but basicily if you use READ_SMS to some UX improvement it is most likely not enough to get approved sadly. It has to be something like "the app wont work and there is no work around" situation before it has a chance to be approved.

Check this link which describe in more details about the declaration form step process:

https://support.google.com/googleplay/android-developer/answer/9214102?hl=en

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/andreyvital/react-native-android-sms-listener/issues/48?email_source=notifications&email_token=AHDHZJ7VFJYEGXADHCNB7ADQOXG5HA5CNFSM4IY4BPYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBI6NJQ#issuecomment-542238374, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHDHZJ4WTUREH7XTE7TDPRTQOXG5HANCNFSM4IY4BPYA .

aujisti-ador commented 4 years ago

@jerryheir is your problem solved? Did playstore accept your apk?

jerryheir commented 4 years ago

No

On Wed, Oct 23, 2019, 1:40 PM Fazle Rabbi Ador notifications@github.com wrote:

@jerryheir https://github.com/jerryheir is your problem solved? Did playstore accept your apk?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/andreyvital/react-native-android-sms-listener/issues/48?email_source=notifications&email_token=AHDHZJ6PLKZX46GSDA653Y3QQBA3NA5CNFSM4IY4BPYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECBIFII#issuecomment-545424033, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHDHZJZV67DB5ZWC33PM5XLQQBA3NANCNFSM4IY4BPYA .

ashu-11 commented 4 years ago

Is there any other way without declaring the permission for SMS read in react native android app so that you can read the message. @jerryheir @lyngbach @aujisti-ador @samin

jnsvu commented 4 years ago

Android has SMS Retriver API which can be used to parse one-time passwords from sms. There is at least this lib that uses the api but it seems outdated

arpansharma7474 commented 3 years ago

Please refer below lib for react native https://www.npmjs.com/package/rn-sms-retriever

azozaya commented 1 year ago

Same problem here. Do I need to add some permission in AndroidManifest.xml? What's the option I must select in the Form? I Chose "OTP verification" and got rejected multiple times.