My app doesn't need to read phone state so I'd like to remove the permission from my react native app.
Every time i delete it from everywhere in the project, it is re-added again when I run ./gradlew assembleRelease
How do I get it to stop adding it in?
permission. READ_PHONE_STATE - You must ask the end user to grant this permission.) Allows read only access to the phone's state, and is used to determine the status of any ongoing calls. You need this permission so you can verify that your end user receives a phone call from TeleSign. android.
Apps that target Android 10 or higher and use notifications with fullscreen intents must request the USE_FULL_SCREEN_INTENT permission in their app's manifest file. This is a normal permission, so the system automatically grants it to the requesting app.
Geolocation is enabled by default when you create a project with react-native init . In order to enable geolocation in the background, you need to include the 'NSLocationAlwaysUsageDescription' key in Info. plist and add location as a background mode in the 'Capabilities' tab in Xcode.
Use android manifest merging
Add new file android/app/src/release/AndroidManifest.xml
with contents
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
>
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove"/>
</manifest>
Done! More about manifest merging: https://developer.android.com/studio/build/manifest-merge.html#merge_priorities , section Merge priorities
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With