Search code examples
androidpermissionsmanifest

Automatic approval of permissions in Manifest.xml


There are some permissions which are granted atuomatically, without asking the user to approve them (like bluetooth), and there are the ones which the user is asked to grant (like storage).

Which permissions are granted automatically, and why?


Solution

  • As you mentioned - if your permission is normal permission it will be auto-granted.
    On the other hand - if you are using dangerous permissions like "android.permission.SEND_SMS" the user will have to accept those permissions.

    How does the user accept those dangerous permissions?

    • If the device API level is <= 22 / targetSdkVersion is 22 or lower:

      In that case, the user will be asked (by the system) in the install time to grant all the dangerous permissions for the app.

    • If the device API level is > 22 and targetSdkVersion is above 22:

      The user will not accept dangerous permissions at install time. You must ask the user to grant access to the dangerous permissions at runtime - when you do ask your user to give access to those permissions on run time he will see system dialog that asks him to accept or decline the permissions.

    For more information, you can check this