Mantosh Kumar
Mantosh Kumar

Reputation: 5731

Does adding <uses-permission> tag in AndroidManifest.xml require for application targeted Android 6.0 and above

I am aware about the changes introduced in Android 6.0/SDKVersion 23 regarding the app permission. There is excellent discussion on this topic in the below post.

"Android permission doesn't work even if I have declared it"

Now post Android 6.0, we require to verify and seek various permission during run-time as discussed here.

With this, Does adding tag in AndroidManifest.xml will have any meaning/use case post Android 6.0 targeted devices only?. Or we can remove these entry.

Upvotes: 0

Views: 575

Answers (1)

Mike M.
Mike M.

Reputation: 39191

You always need to list your permissions in the manifest. Quoting the developer page covering Requesting Permissions at Run Time:

On all versions of Android, your app needs to declare both the normal and the dangerous permissions it needs in its app manifest, as described in Declaring Permissions.

If you don't, you'll probably end up with an Exception at runtime when trying to check or request them.

Upvotes: 1

Related Questions