1. 程式人生 > >【android】安卓的許可權提示及版本相關

【android】安卓的許可權提示及版本相關

Only dangerous permissions require user agreement. The way Android asks the user to grant dangerous permissions depends on the version of Android running on the user's device, and the system version targeted by your app.

在android6.0(含6.0)以上的版本,是在執行時候進行許可權的檢測提示;
If the device is running Android 6.0 (API level 23) or higher, and the app's targetSdkVersion is 23 or higher, the user isn't notified of any app permissions at install time. Your app must ask the user to grant the dangerous permissions at runtime.


在android5.1.1(含5.1.1)一下的版本,是在安裝時候進行許可權的檢測;
If the device is running Android 5.1.1 (API level 22) or lower, or the app's targetSdkVersion is 22 or lower while running on any version of Android, the system automatically asks the user to grant all dangerous permissions for your app at install-time