Android Question How to know where permissions are requested?

Discussion in 'Android Questions' started by ducphu, Mar 10, 2015.

  1. ducphu

    ducphu Active Member Licensed User

    Hi all,

    In my AndroidManifest file, I see many permissions being requested by my app, like:

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.VIBRATE"/>
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>


    May I ask if how I know which permission is requrested by which lib? So far, I only know that the following permissions are added by me:
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.VIBRATE"/>
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>

    And I'm not sure where the rest of permissions come from:
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES"/>
     
  2. KZero

    KZero Active Member Licensed User

    which libraries you use ?
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    Compile with F5 and then press on the List Permissions button.
     
    DonManfred and thedesolatesoul like this.
  4. ducphu

    ducphu Active Member Licensed User

    Thank Erel :)
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    Note that there is a common misconception about permissions. Permissions are added when you declare an object type that requires the permissions, not when you add libraries.
     
    lemonisdead and thedesolatesoul like this.
  6. ducphu

    ducphu Active Member Licensed User

    OK noted. May I ask, I use broadcastreceiver lib in my app and it adds these permissions:
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES"/>

    I don't see why my app need those permissions. I only uses broadcastreceiver to catch android.intent.action.CONFIGURATION_CHANGED
    Can I manually delete them.?
     
  7. NJDude

    NJDude Expert Licensed User

    You can remove permissions using the Manifest Editor (RemovePermission)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice