Skip to content

Remove uses-permission from AndroidManifest.xml #34

@ghost

Description

Problem Statement:

I am using react-native-get-sms-android for reading sms only. Still my app asks permission for WRITE_SMS and SEND_SMS, even though I have not asked for that permission.

Cause:

The permission specified in the AndroidManifest.xml of this plugin.

Solution:

Remove the permissions from this plugin's AndroidManifest.xml and let developers add it to their app's Manifest so that there are no permissions required that the developer is not aware of.

Workaround:

Add this to your app's android/app/src/main/AndroidManifest.xml and it will remove unnecessary permission.

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

Also add xmlns:tools to your manifest tag to work:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions