(the following is extracted from a blog post of mine about this)
The big reason for not getting your permission nowadays is because
your project has a
targetSdkVersion of 23 or higher, and the permission
that you are requesting is “dangerous”. In Android 6.0, this includes:
For these permissions, not only does your
targetSdkVersion 23+ app
need to have the
<uses-permission> element(s), but you also have
to ask for those permissions at runtime from the user on Android 6.0+
devices, using methods like
As a temporary workaround, drop your
targetSdkVersion below 23.
However, eventually, you will have some reason to want your
targetSdkVersion to be 23 or higher. At that time, you will need
to adjust your app to use the new runtime permission system.
The Android documentation has
a page dedicated to this topic.