Search code examples
androidpermissionsandroid-manifestandroid-5.0-lollipop

Android Studio, need help understand App Permissions


My App is set to Android 5.0. From my understanding, according to Google Developer documents under Permissions if app targets Android 6.0 then the permission have to be inside the app like custom permissions with iOS apps where the app developer creates a custom page for permissions?

While for app targets under 5.1.1 (like mine) when the user clicks on "install" in Google Play Store, permissions pop up and they have to accept all right away. (I don't own an Android so I don't know how it works).

Besides adding the "dangerous" permissions like Camera, Microphone, Location in my Android Manifest, do I still have to create a separate XML file with the same permissions where inside the app the user clicks on it and it takes them to Android Settings app or they just have to click "allow" or do I not even have to create this permissions XML anymore?


Solution

  • do I still have to create a separate XML file with the same permissions where inside the app the user clicks on it and it takes them to Android Settings app or they just have to click "allow" or do I not even have to create this permissions XML anymore?

    There never was this sort of XML file for Android, and there is none now.

    For Android 6.0+ runtime permissions, you need to have all of the <uses-permission> elements that you had in your manifest from before. In addition, in Java code, you will request the permissions at runtime, using methods like ContextCompat.checkSelfPermission() and ActivityCompat.requestPermissions().