11

As you know, According to Google Developer policy if our core functionality of the app does not depends on SMS than we should remove RECEIVE_SMS android permission and try to find a different Alternative.

But my issue is I am not using RECEIVE_SMS in manifest or in asking Runtime. Still, Google warns me of using RECEIVE_SMS permission.

Though on play store If I check permissions required in this app it shows RECEIVE_SMS permission.

You can see some of the screenshots of my app where I searched for this permission if I am using it anywhere by mistake.

But I am unable to find it.

enter image description here

Also this one in manifest:

enter image description here

As you can see I am not asking for that permission nor in manifest or runtime.

I am using Firebase Phone authentication and PayUMoney Payment integration. Is it possible that these two might be causing issues? or they are internally asking for this permission.

I don't know from where this permission is coming from.

It would be a great help if anyone can help me with this issue.

anyone facing the same issue?

Dhiru
  • 3,040
  • 3
  • 25
  • 69
CodeGeek
  • 677
  • 2
  • 8
  • 22

2 Answers2

12

Well, the issue is with PayUMoney library. Because Firebase Phone Auth is not asking for RECEIVE_SMS permission.

What you can do is you can remove the library one by one and check if it is still asking for the RECEIVE_SMS permission.

If you find which library is causing this then you can write this in your Android Manifest

<uses-permission
        android:name="android.permission.RECEIVE_SMS"
        tools:node="remove" />

This will prevent a library from asking this permission internally. Also please check if your library is functional without this permission after adding this line to your app manifest.

For your particular question, PayUMoney is causing this issue and not Firebase so you can add this line to your manifest. and check the PayuMoney is functional.

Javier C.
  • 7,859
  • 5
  • 41
  • 53
Abubakker Moallim
  • 1,610
  • 10
  • 20
-1

Firebase Phone authentication will need to use SMS to authenticate you. So it is needed on your permission. That is why you have this error, this is a simple way of saying; please include SMS permissions.

And please you can try and use this library for easy permissions manipulation;

implementation 'gun0912.ted:tedpermission:2.2.2

And whenever you need permission just do;

` public class GrantPermisions {

public static void givePermision(final Context context){

    PermissionListener permissionlistener = new PermissionListener() {
        @Override
        public void onPermissionGranted() {

        }

        @Override
        public void onPermissionDenied(List<String> deniedPermissions) {

        }


    };

    TedPermission.with(context)
            .setPermissionListener(permissionlistener)
            .setDeniedMessage("If you reject permission,you can not use this service\n\nPlease turn on permissions at [Setting] > [Permission]")
            .setPermissions(Manifest.permission.INTERNET,
                    Manifest.permission.READ_SMS,
                    Manifest.permission.READ_CALL_LOG)
            .check();
}

}`

Hope you fix it. Production awaits mate!!!

ElectronSz
  • 32
  • 1
  • 6
  • I am not having any error. Google is asking me to remove this permission as per their developer policy. – CodeGeek Dec 10 '18 at 13:58
  • 1
    But as you can see I am not asking for this permission explicitly – CodeGeek Dec 10 '18 at 13:58
  • You need to use SMS. Theres no way you can remove it. I think you have to disable firebase phone authentication. Otherwise it won't work – ElectronSz Dec 10 '18 at 13:59
  • But I asked Google for exception but they dont provide any option to prove my case – CodeGeek Dec 10 '18 at 14:01
  • Are you trying to understand my issue ? Did you got any notice for your app on google play ? – CodeGeek Dec 10 '18 at 14:04
  • So what should I have to do now? I asked for the exception but Google still tells me to remove it. – CodeGeek Dec 10 '18 at 14:10
  • Google closely monitor SMS and phone permissions of apps on Play Store as of October 8. Find the functions that need SMS and look for alternatives. Or upload your app on another provider. – ElectronSz Dec 10 '18 at 14:15
  • But if I am using firebase authentication and I am not explicity reading any sms's of user. Firebase phone automatically does that than google should change their library. – CodeGeek Dec 10 '18 at 14:22
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/185012/discussion-between-electronsz-and-codegeek). – ElectronSz Dec 10 '18 at 14:23