0

I have a non-ejected android app created with create-react-native-app.

Google is requiring those apps to remove CALL_LOG and SMS permissions on its manifest file, but i can't find that file.

How can i set those permissions?

Artur Haddad
  • 1,429
  • 2
  • 16
  • 33

1 Answers1

1

Open android/app/src/main/AndroidManifest.xml, add the following:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.myappid"
+   xmlns:tools="http://schemas.android.com/tools"
    >

    ...
+   <uses-permission tools:node="remove" android:name="android.permission.WRITE_CALL_LOG" />
+   <uses-permission tools:node="remove" android:name="android.permission.CAMERA" />

If you want to remove permissions from production APK, then:

  1. Create a new directory inside this directory, called release. (path: android/app/src/release/)

  2. Create an AndroidManifest.xml file. (path: android/app/src/release/AndroidManifest.xml)

And add above lines in the android/app/src/release/AndroidManifest.xml

navylover
  • 12,383
  • 5
  • 28
  • 41