Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Dependency Library permission

In my android project (using Android Studio), I have integrated a library which uses few extra permissions in its Manifest file. I want to remove one of the permissions which it uses for my app as i don't use that feature from the library and it is unwanted permission for my app.

I read about marker Selectors and tried it but it is not removing the permission.

This is what I added to my app manifest file:

<permission
        android:name="android.permission.AUTHENTICATE_ACCOUNTS"
        tools:node="remove" />

    <permission
        android:name="android.permission.MANAGE_ACCOUNTS"
        tools:node="remove" />

But still while installing the app, I see the permission for "find accounts on the device" being asked.

can someone tell me what am I doing wrong or am I missing something?

My app manifest is kept in src/main location.

I tried other answers from StackOverflow but they did not solve the issue for me.

Thanks for any help

like image 686
Sushil Avatar asked May 24 '16 15:05

Sushil


People also ask

What is Read_phone_state permission?

android. 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.

What is Android permission Query_all_packages?

Use of the broad package (App) visibility (QUERY_ALL_PACKAGES) permission. Google Play restricts the use of high-risk or sensitive permissions, including the QUERY_ALL_PACKAGES permission, which gives visibility into the inventory of installed apps on a given device.


1 Answers

Changing word "permission" to "uses-permission" fixed the issue for me:

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

    <uses-permission
        android:name="android.permission.MANAGE_ACCOUNTS"
        tools:node="remove" />
like image 79
Sushil Avatar answered Sep 18 '22 13:09

Sushil