Remove CALL_LOG and SMS permission in ejected expo app

I tried to remove the CALL_LOG and SMS permission within my React Native app to compliant with Google new policy. However, after multiple tried, I can’t seem to get the alert message on Google Dev Console go away. It seem my APK still have not remove these permission. In my Android Manifest, I added

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

Also I tried to search all of my project and see that the CALL_LOG and SMS permission is nowhere to be found. If anyone had successful remove these permission with their ejected RN app can help me, that would be much appreciated.

Hi, same here. I commented out anything related to SMS and CALL in AndroidManifest.xml, but the warning persists. Does anyone know how to deal with it? Thanks.

Here’s what I did:

  1. Updated Android Manifest with tools:node="remove"
  2. Updated app.json without any CALL / SMS permissions.
"android": {
      "permissions": [
        "MANAGE_DOCUMENTS",
        "READ_EXTERNAL_STORAGE",
        "VIBRATE",
        "WRITE_EXTERNAL_STORAGE",
        "com.anddoes.launcher.permission.UPDATE_COUNT",
        "com.android.launcher.permission.INSTALL_SHORTCUT",
        "com.google.android.c2dm.permission.RECEIVE",
        "com.google.android.gms.permission.ACTIVITY_RECOGNITION",
        "com.google.android.providers.gsf.permission.READ_GSERVICES",
        "com.htc.launcher.permission.READ_SETTINGS",
        "com.htc.launcher.permission.UPDATE_SHORTCUT",
        "com.majeur.launcher.permission.UPDATE_BADGE",
        "com.sec.android.provider.badge.permission.READ",
        "com.sec.android.provider.badge.permission.WRITE",
        "com.sonyericsson.home.permission.BROADCAST_BADGE"
      ],

After these steps I checked my play store listing, and it did reflect my changes (no call/sms permissions) but in the Play Console the warning is still there.

Any one found a solution yet?

We are working on removing the need for the SMS permission in a future SDK version.

The only thing it was used for was so that the SMS API, which presented the system UI for sending texts, could report back whether the user hit “Send” or canceled the text — moving forward, the SMS API will provide this only on platforms that provide this info (namely iOS) since it is no longer available on Android.

Hi, thanks for the reply. In that case, can I just npm uninstall expo-sms?

I tried to npm uninstall and removed the expo-sms folder, but expo.js complained about missing folder, so I had to put the folder back.

Hey!! Good news!!

The warning disappeared!

Here’s what I did:

  1. Use tools:node="remove" on permissions you want to removed as described by OP
  2. Duplicate AndroidMananifest.xml and put it in prodKernel folder like this:
  3. Build and upload new apk, wait for ~2 hours for Google Play to process.

Same here !

The deadline is quite soon :scream:
Is there any guideline how we can remove these specific permissions using Expo (without ejecting the app) for Android right now ?

3 Likes

Thanks for the clarification.

For those who do not have ejected apps, is there a temporary fix? Or do we need to wait until the next release of the SDK?

January 9th is coming up shortly, just want to make sure I am prepared.

1 Like

@llecocq @ohope - assuming you’re not using the SMS module, there is already a way around this – you can set android.permissions to [] in app.json and rebuild your app. This will completely remove the READ_SMS permission from your app.

Note that if your app is ejected, you’ll need to manually add the line

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

to your AndroidManifest.xml file, as referenced earlier in this thread.

@esamelson I am using ExpoKit (detached app) and I have updated “AndroidManifest.xml” manually and deployed the latest build into google play store and it has been 4-5 hours, it is still showing the same alert message in google play console dashboard.

“This app will be impacted by a change in the Google Play policy governing the use of SMS and CALL_LOG permissions. Apps that are not compliant may be removed from Google Play on Jan 9th, 2019.”

How do I verify that its actually removed that permission or not?

Hi @opptygo.com - please see this post https://github.com/expo/expo/issues/2739#issuecomment-448269654 . Apparently there is a bug with the Play Console where that warning is cached and will take a day or two to go away. As long as you check the permissions pop up box and see that SMS is not there, and you don’t have any older APKs in other alpha/beta/internal tracks that do still have the permission, you should be good to go. I’d still recommend checking again in a day or two to ensure the warning has gone away.

I have tried multiple method but the warning still doesn’t seem to go away. How to I open the permissions pop up box as you mention to check for permission ? I have ejected the app and building it with android studio

For me the issue was the alpha release channel, it had an ancient apk with unrestricted permissions.

2 Likes

Thank you for the advice, when I go back and checked, my app also still have the old beta release with wrong permission. Changed that and the warning go away

hey expo team, if I remove permissions from app json like you said with " android.permissions to []", is all my permission revoked? For example, I am using notifications. Is my permission for notification revoked too?

3 Likes

@ide Can we get an answer here as the deadline approach ?
For standalone built
What is the impact of settings the android permissions to ?

I’m using Notifications, ImagePicker, ect. Will it still work ?

1 Like

Mine were revoked

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.