1. Android 6.0, the app direct Android, the runtime asks the user to grant the relevant permissions, the system pops up a dialog box, (this dialog box can not be customized by the developer)
Users can also manage permissions for an app in the phone's settings
Note: This dialog box is not automatically ejected by the system, but rather a developer who calls a method that must be authorized by the user, checks (if there is authorization to call directly) and requests user permissions before calling, which may cause a direct program crash due to no authorization
Focus: Check for and request user permissions in a place that requires user permissions, or the program crashes
2. Classification of permissions
Whether it involves user privacy, permissions are divided into two categories: the first category does not involve privacy, in the manifest declaration, such as Bluetooth, network,NFC , etc.
The second category relates to privacy: SD card read/write, contacts, SMS, etc.
3. The concept of a permission group
All dangerous Android system permissions belong to permission group
4. The runtime does not require authorized permissions:
The first kind of permission, does not involve the user's privacy permission, in the manifest declaration can, moreover, installs and obtains the authorization, the user cannot cancel, unless uninstalls.
5. Run-time permissions required for authorization
Condition: The app runs on Android 6.0 (API 23) or higher, and targetsdkversion>=23, the system will automatically adopt the Dynamic rights rights policy
Precautions:
(1) Such permission must be declared in manifest so that the user is prompted for authorization upon application. Otherwise, directly callback developer permissions and be rejected
(2) Apply for a certain permission, the System popup dialog is a description of the entire permission group
(3) because (2) Therefore, one of the permissions of the same permission group is authorized, and other rights in the same group are granted automatically
6. Systems that are below Android 6.0 still use the old Rights Management policy:
(1) Request user authorization permission when installing
(2) Authorization for permission groups, not one permission
7. Data storage
Github:https://github.com/yanzhenjie/andpermission
Https://github.com/yanzhenjie/AndPermission/blob/master/README-CN.md
8. Pending extension:
Dynamic Rights Management Policy: Practice, Demo
Android Rights Management (continuous grooming)