react-native-android-sms-listener icon indicating copy to clipboard operation
react-native-android-sms-listener copied to clipboard

Issue: Violation of Permissions policy From Google Playstore

Open jerryheir opened this issue 5 years ago • 10 comments

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

jerryheir avatar Sep 20 '19 23:09 jerryheir

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

lyngbach avatar Oct 15 '19 12:10 lyngbach

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 [email protected] 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 .

jerryheir avatar Oct 15 '19 13:10 jerryheir

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

lyngbach avatar Oct 15 '19 14:10 lyngbach

Thanks for the tip!

On Tue, Oct 15, 2019 at 3:23 PM Rune Lyngbach Jensen < [email protected]> 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 .

jerryheir avatar Oct 16 '19 06:10 jerryheir

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

aujisti-ador avatar Oct 23 '19 12:10 aujisti-ador

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

ashu-11 avatar Nov 02 '19 03:11 ashu-11

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

jnsvu avatar Nov 21 '19 09:11 jnsvu

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

arpansharma7474 avatar Oct 13 '20 04:10 arpansharma7474

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.

azozaya avatar Dec 15 '22 17:12 azozaya