For Android 6.0 and above, the APP permission pop-up window will appear when the APP is opened for the first time.
For a better experience, you can add default permissions for your APP with the following method.
List of Permission Names
1 | PHONE_PERMISSIONS |
Modify the SDK Source
Modify the file:
1 | frameworks/base/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java |
Add permissions to the grantdefaultsystemhandlerpermissions()
function:
1 | //com.xxx.xxx is the package name |