<uses-permission android:name="android.permission.INTERNET" />
关于运行时权限
在旧的权限管理系统中,权限仅仅在App安装时询问用户一次,用户同意了这些权限App才能被安装(某些深度定制系统另说),App一旦安装后就可以偷偷的做一些不为人知的事情了
(同样,某些深度定制系统另说)
。
从Android6.0开始,App可以直接安装,App在运行时一个一个询问用户是否授予权限,系统会弹出一个对话框让用户选择是否授权某个权限给App(这个Dialog是系统定义的,不能由开发者定制,但必须由
开发者手动调用
),当App要求用户授予不恰当的权限的时候,用户可以拒绝
(然而,很多APP可能会在请求权限失败后直接退出,所以你往往无法拒绝)
,用户也可以在设置页面对每个App的权限进行管理。
新的权限策略讲权限分为两类,第一类是不涉及用户隐私的,只需要在Manifest中声明即可,比如网络、蓝牙、NFC等;第二类是涉及到用户隐私信息的,需要用户授权后才可使用,比如SD卡读写、联系人、短信读写等。
不需要运行时申请的权限
此类权限都是正常保护的权限,只需要在AndroidManifest.xml中简单声明这些权限即可,安装即授权,不需要每次使用时都检查权限,而且用户不能取消以上授权,除非用户卸载App。
需要运行时申请的权限
所有危险的Android系统权限属于权限组,如果APP运行在Android 6.0 (API level 23)或者更高级别的
设备中,并且
targetSdkVersion>=23时,系统将会自动采用动态权限管理策略,如果你在涉及到特殊权限操作时没有申请权限而直接调用了相关代码,你的App可能就崩溃了。
综上所述你需要注意:
- 此类权限也必须在Manifest中申明,否则申请时不提示用户,直接回调开发者权限被拒绝。
- 同一个权限组的任何一个权限被授权了,这个权限组的其他权限也自动被授权。例如一旦WRITE_CONTACTS被授权了,App也有READ_CONTACTS和GET_ACCOUNTS了。
- 申请某一个权限的时候系统弹出的Dialog是对整个权限组的说明,而不是单个权限。例如我申请READ_EXTERNAL_STORAGE,系统会提示"允许xxx访问设备上的照片、媒体内容和文件吗?"。
其他情景:
1、targetSdkVersion小于
等于
22,但是设备
系统版本
小于
等于
6.0:
- app使用旧的权限管理策略
- 注册文件列出的权限将会在安装时要求用户授予权限
- 用户可以在设置列表中编辑相关权限,这对app能否正常运行有很大影响
2、targetSdkVersion大于等于23,但是设备系统
版本
小于6.0:
- app使用旧的权限管理策略
- 注册文件列出的权限将会在安装时要求用户授予权限
需要授权的权限组
使用adb命令可以查看这些需要授权的权限组:
adb shell pm list permissions -d -g
以下为华为手机上的数据(Android 6.0.1)
(注意:不同系统可能稍有差异,特别是某些定制系统会添加一些额外的权限,但是以下标红部分是Android系统定义的最基本的危险权限,基本上定制系统也都会有)
C:\Users\Administrator>adb shell pm list permissions -d -g* daemon not running. starting it now at tcp:5037 ** daemon started successfully *Dangerous Permissions:group:com.google.android.gms.permission.CAR_INFORMATION 汽车资料permission:com.google.android.gms.permission.CAR_VENDOR_EXTENSION 供应商permission:com.google.android.gms.permission.CAR_MILEAGE 里程permission:com.google.android.gms.permission.CAR_FUEL 燃料group:android.permission-group.CONTACTS 联系人permission:android.permission.WRITE_CONTACTSpermission:android.permission.GET_ACCOUNTSpermission:android.permission.READ_CONTACTSgroup:android.permission-group.PHONE 手机permission:android.permission.READ_CALL_LOGpermission:android.permission.READ_PHONE_STATEpermission:android.permission.CALL_PHONEpermission:android.permission.WRITE_CALL_LOGpermission:android.permission.USE_SIPpermission:android.permission.PROCESS_OUTGOING_CALLSpermission:com.android.voicemail.permission.ADD_VOICEMAILgroup:com.kingroot.kinguser.permission-group.SUPERUSER 超级管理员group:android.permission-group.CALENDAR 日历permission:android.permission.READ_CALENDARpermission:android.permission.WRITE_CALENDARgroup:android.permission-group.CAMERA 相机permission:android.permission.CAMERAgroup:android.permission-group.SENSORS 传感器permission:android.permission.BODY_SENSORSgroup:android.permission-group.LOCATION 位置permission:android.permission.ACCESS_FINE_LOCATIONpermission:com.google.android.gms.permission.CAR_SPEEDpermission:android.permission.ACCESS_COARSE_LOCATIONgroup:android.permission-group.STORAGE 存储卡permission:android.permission.READ_EXTERNAL_STORAGEpermission:android.permission.WRITE_EXTERNAL_STORAGEgroup:com.sina.weibo.permission-grouppermission:com.sina.weibo.permission.USERgroup:android.permission-group.MICROPHONE 麦克风permission:android.permission.RECORD_AUDIOgroup:android.permission-group.SMS 短信permission:android.permission.READ_SMSpermission:android.permission.RECEIVE_WAP_PUSHpermission:android.permission.RECEIVE_MMSpermission:android.permission.RECEIVE_SMSpermission:android.permission.SEND_SMSpermission:android.permission.READ_CELL_BROADCASTSungrouped:未分组的permission:com.huawei.pushagent.permission.RICHMEDIA_PROVIDERpermission:com.huawei.contacts.permission.HW_NUMBER_MARKpermission:com.huawei.motion.permission.MOTION_EXpermission:com.huawei.contacts.permission.CHOOSE_SUBSCRIPTION
使用系统API完整演示
public class MainActivity extends ListActivity {private static final int REQUESTCODE = 20094;protected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);String[] array = {"在没有申请权限的情况下在SD卡创建文件会失败","完整的授权过程演示","演示PermissionsDispatcher",};setListAdapter(new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, new ArrayList<>(Arrays.asList(array))));}@Overrideprotected void onListItemClick(ListView l, View v, int position, long id) {switch (position) {case 0:createFileWithoutRequestPermission(this);break;case 1:requestPermissionBeforeCreateFile();break;case 2:startActivity(new Intent(this, Activity1.class));break;}}/*** 如果将targetSdkVersion改为22或以下,可以成功创建文件* 相反,如果改为23或以上,则失败*/public static void createFileWithoutRequestPermission(Context context) {String fileName = new SimpleDateFormat("yyyy.MM.dd_HH.mm.ss", Locale.getDefault()).format(new Date());File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath(), fileName + ".txt");boolean createFile = false;try {createFile = file.createNewFile();//没有申请权限时就在SD卡创建文件会失败(当然,如果文件已经存在,返回值也是false)} catch (IOException e) {e.printStackTrace();} finally {Toast.makeText(context, "创建文件结果:" + createFile, Toast.LENGTH_SHORT).show();}}private void requestPermissionBeforeCreateFile() {//检查权限。结果:PERMISSION_GRANTED=0,有权限;PERMISSION_DENIED=-1,没有权限int state = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);Toast.makeText(this, "写SD卡权限状态:" + state, Toast.LENGTH_SHORT).show();if (state != PackageManager.PERMISSION_GRANTED) {// 没有权限,申请权限//是否应该显示请求权限的说明。//加这个提醒的好处在于:第一次申请权限时不需要麻烦用户,但如果用户拒绝过一次权限后我们再次申请时//可以提醒用户授予该权限的必要性,免得再次申请时用户勾选"不再提醒"并拒绝,导致下次申请权限直接失败//返回值的特点:第一次请求权限之前调用返回false(不应该提醒);如果用户拒绝了,则下次调用返回true(应该提醒)//如果之后再次请求权限时,用户拒绝了并选择了"不再提醒",则下次调用返回false(不应该提醒,且不弹授权对话框)boolean state2 = ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);if (state2) {// 一般是通过弹一个自定义的对话框告诉用户,我们为什么需要这个权限new AlertDialog.Builder(this).setTitle("请求读写SD卡权限").setMessage("请求SD卡权限,作用是给你保存妹子图片").setPositiveButton("知道了", (dialog, which) -> ActivityCompat.requestPermissions(MainActivity.this,new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, REQUESTCODE)).create().show();} else {//请求用户授权几个权限,调用后系统会显示一个请求用户授权的提示对话框,开发者不能修改这个对话框ActivityCompat.requestPermissions(MainActivity.this,//api 23以后可以调用Activity的requestPermissions方法new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},//需要申请的权限数组REQUESTCODE);//请求码,会在回调onRequestPermissionsResult()时返回}} else {// 有权限了,去放肆吧。createFileWithoutRequestPermission(this);}}@Override//当用户处理完授权操作时,会回调Activity或Fragment的此方法,参数为:权限数组、授权结果数组public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {super.onRequestPermissionsResult(requestCode, permissions, grantResults);if (grantResults.length > 0) {switch (requestCode) {case REQUESTCODE: {if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {createFileWithoutRequestPermission(this);} else {Toast.makeText(this, "你拒绝了权限,我们已经没法愉快的玩耍了,我将在3秒后关闭!", Toast.LENGTH_SHORT).show();new Handler().postDelayed(this::finish, 3 * 1000);}}}}}}
PermissionsDispatcher 简介
Simple annotation-based API to handle runtime permissions.
PermissionsDispatcher provides a simple annotation-based API to handle runtime permissions in Android Marshmallow.
This library lifts the burden that comes with writing a bunch of check statements whether a permission has been granted or not from you, in order to keep your code clean and safe.
使用简单的基于
注解
的API来处理运行时权限。
PermissionsDispatcher 提供了一个简单的基于注解的API处理Android M 系统
的
运行时权限。
这个库解除了编写一系列检查语句时的负担,不管您是否已经被授予权限,以保持代码的整洁和安全。
使用过程
1、添加依赖
app
compile 'com.github.hotchemi:permissionsdispatcher:2.4.0'annotationProcessor 'com.github.hotchemi:permissionsdispatcher-processor:2.4.0'
根目录
allprojects {repositories {jcenter()mavenCentral()//或 maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local/' }}}
注意:要将targetSdkVersion设为23货以上
targetSdkVersion 25
2、
给
Activity、Fragment、方法
添加注解
| Annotation | Required | Description |
| @RuntimePermissions | ✓ | 注解在其内部需要使用运行时权限的Activity或Fragment上 |
| @NeedsPermission | ✓ | 注解在需要调用运行时权限的方法上,当用户给予权限时会执行该方法 |
| @OnShowRationale | 注解在用于向用户解释为什么需要调用该权限的方法上:第一次请求权限之前调用返回false;如果用户拒绝了,则下次调用返回true;如果之后再次请求权限时,用户拒绝了并选择了"不再提醒",则下次调用返回false。 | |
| @OnPermissionDenied | 注解在当用户拒绝了权限请求时需要调用的方法上 | |
| @OnNeverAskAgain | 注解在当用户选中了授权窗口中的不再询问复选框后并拒绝了权限请求时需要调用的方法,一般可以向用户解释为何申请此权限,并根据实际需求决定是否再次弹出权限请求对话框 |
只有 @RuntimePermissions 和 @NeedsPermission 是必须的,其余注解均为可选。
注意:被注解的方法不能是私有方法。
3、当使用了@RuntimePermissions 和 @NeedsPermission 之后,点击"菜单栏→Build
→
Make Project"重新编译整个项目。
编译完成后,
会在 app\build\intermediates\classes\debug 目录下
生成一个
与被注解的Activity同一个包下的辅助类,名称为
"
被注解的Activity名称+PermissionsDispatcher.class"。
4、
调用辅助类里面的方法
在需要调用权限的位置调用辅助类里面的"xxxWithCheck"静态方法,xxx是被 @NeedsPermission 注解的方法名。如:
Activity1PermissionsDispatcher.createFileWithCheck(Activity1.this)
另外,还需要重写该Activity的onRequestPermissionsResult()方法,其方法内调用辅助类的onRequestPermissionsResult()方法,如:
Activity1PermissionsDispatcher.onRequestPermissionsResult(this, requestCode, grantResults);
PermissionsDispatcher 完整演示
@RuntimePermissionspublic class Activity1 extends Activity {protected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);TextView tv = new TextView(this);setContentView(tv);tv.setBackgroundColor(Color.YELLOW);tv.setOnClickListener(v -> Activity1PermissionsDispatcher.createFileWithCheck(Activity1.this));}@NeedsPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE)void createFile() {Toast.makeText(this, "【NeedsPermission,用户允许了该权限】", Toast.LENGTH_SHORT).show();MainActivity.createFileWithoutRequestPermission(Activity1.this);}@OnPermissionDenied(Manifest.permission.WRITE_EXTERNAL_STORAGE)void doOnPermissionDenied() {Toast.makeText(this, "【OnPermissionDenied,用户拒绝了该权限】", Toast.LENGTH_SHORT).show();}@OnShowRationale(Manifest.permission.WRITE_EXTERNAL_STORAGE)void doOnShowRationale(final PermissionRequest request) {Toast.makeText(this, "【OnShowRationale,此时应该显示请求权限的说明】", Toast.LENGTH_SHORT).show();// 一般是通过弹一个自定义的对话框告诉用户,我们为什么需要这个权限new AlertDialog.Builder(this).setTitle("请求读写SD卡权限").setMessage("请求SD卡权限,这样我才能给你保存妹子图片哦").setPositiveButton("我知道了", (dialog, which) -> request.proceed()).setNegativeButton("我不需要", (dialog, which) -> request.cancel()).create().show();}@OnNeverAskAgain(Manifest.permission.WRITE_EXTERNAL_STORAGE)void doOnNeverAskAgain() {Toast.makeText(this, "你拒绝了读写SD卡权限并选择了\"不再提醒\"," +"\n已经没法愉快的玩耍了,我将在3秒后关闭!", Toast.LENGTH_SHORT).show();new Handler().postDelayed(this::finish, 3 * 1000);}@Overridepublic void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {super.onRequestPermissionsResult(requestCode, permissions, grantResults);Activity1PermissionsDispatcher.onRequestPermissionsResult(this, requestCode, grantResults);}}
生成的辅助类(注意并没有生成".java"源码)
//// Source code recreated from a .class file by IntelliJ IDEA// (powered by Fernflower decompiler)//package permission.bqt.com.permissiontest;import android.support.v4.app.ActivityCompat;import java.lang.ref.WeakReference;import permission.bqt.com.permissiontest.Activity1;import permissions.dispatcher.PermissionRequest;import permissions.dispatcher.PermissionUtils;final class Activity1PermissionsDispatcher {private static final int REQUEST_CREATEFILE = 0;private static final String[] PERMISSION_CREATEFILE = new String[]{"android.permission.WRITE_EXTERNAL_STORAGE"};private Activity1PermissionsDispatcher() {}static void createFileWithCheck(Activity1 target) {if(PermissionUtils.hasSelfPermissions(target, PERMISSION_CREATEFILE)) {target.createFile();} else if(PermissionUtils.shouldShowRequestPermissionRationale(target, PERMISSION_CREATEFILE)) {target.doOnShowRationale(new Activity1PermissionsDispatcher.CreateFilePermissionRequest(target));} else {ActivityCompat.requestPermissions(target, PERMISSION_CREATEFILE, 0);}}static void onRequestPermissionsResult(Activity1 target, int requestCode, int[] grantResults) {switch(requestCode) {case 0:if(PermissionUtils.verifyPermissions(grantResults)) {target.createFile();} else if(!PermissionUtils.shouldShowRequestPermissionRationale(target, PERMISSION_CREATEFILE)) {target.doOnNeverAskAgain();} else {target.doOnPermissionDenied();}default:}}private static final class CreateFilePermissionRequest implements PermissionRequest {private final WeakReference<Activity1> weakTarget;private CreateFilePermissionRequest(Activity1 target) {this.weakTarget = new WeakReference(target);}public void proceed() {Activity1 target = (Activity1)this.weakTarget.get();if(target != null) {ActivityCompat.requestPermissions(target, Activity1PermissionsDispatcher.PERMISSION_CREATEFILE, 0);}}public void cancel() {Activity1 target = (Activity1)this.weakTarget.get();if(target != null) {target.doOnPermissionDenied();}}}}
【权限列表-英文解释】
| ACCESS_CHECKIN_PROPERTIES | Allows read/write access to the "properties" table in the checkin database, to change values that get uploaded. |
| ACCESS_COARSE_LOCATION | Allows an app to access approximate location. |
| ACCESS_FINE_LOCATION | Allows an app to access precise location. |
| ACCESS_LOCATION_EXTRA_COMMANDS | Allows an application to access extra location provider commands |
| ACCESS_NETWORK_STATE | Allows applications to access information about networks |
| ACCESS_NOTIFICATION_POLICY | Marker permission for applications that wish to access notification policy. |
| ACCESS_WIFI_STATE | Allows applications to access information about Wi-Fi networks. |
| ACCOUNT_MANAGER | Allows applications to call into AccountAuthenticators. |
| ADD_VOICEMAIL | Allows an application to add voicemails into the system. |
| BATTERY_STATS | Allows an application to collect battery statistics |
| BIND_ACCESSIBILITY_SERVICE | Must be required by an AccessibilityService, to ensure that only the system can bind to it. |
| BIND_APPWIDGET | Allows an application to tell the AppWidget service which application can access AppWidget's data. |
| BIND_CARRIER_MESSAGING_SERVICE | This constant was deprecated in API level 23. Use BIND_CARRIER_SERVICES instead |
| BIND_CARRIER_SERVICES | The system process that is allowed to bind to services in carrier apps will have this permission. |
| BIND_CHOOSER_TARGET_SERVICE | Must be required by a ChooserTargetService, to ensure that only the system can bind to it. |
| BIND_DEVICE_ADMIN | Must be required by device administration receiver, to ensure that only the system can interact with it. |
| BIND_DREAM_SERVICE | Must be required by an DreamService, to ensure that only the system can bind to it. |
| BIND_INCALL_SERVICE | Must be required by a InCallService, to ensure that only the system can bind to it. |
| BIND_INPUT_METHOD | Must be required by an InputMethodService, to ensure that only the system can bind to it. |
| BIND_MIDI_DEVICE_SERVICE | Must be required by an MidiDeviceService, to ensure that only the system can bind to it. |
| BIND_NFC_SERVICE | Must be required by a HostApduService or OffHostApduService to ensure that only the system can bind to it. |
| BIND_NOTIFICATION_LISTENER_SERVICE | Must be required by an NotificationListenerService, to ensure that only the system can bind to it. |
| BIND_PRINT_SERVICE | Must be required by a PrintService, to ensure that only the system can bind to it. |
| BIND_REMOTEVIEWS | Must be required by a RemoteViewsService, to ensure that only the system can bind to it. |
| BIND_TELECOM_CONNECTION_SERVICE | Must be required by a ConnectionService, to ensure that only the system can bind to it. |
| BIND_TEXT_SERVICE | Must be required by a TextService (e.g. |
| BIND_TV_INPUT | Must be required by a TvInputService to ensure that only the system can bind to it. |
| BIND_VOICE_INTERACTION | Must be required by a VoiceInteractionService, to ensure that only the system can bind to it. |
| BIND_VPN_SERVICE | Must be required by a VpnService, to ensure that only the system can bind to it. |
| BIND_WALLPAPER | Must be required by a WallpaperService, to ensure that only the system can bind to it. |
| BLUETOOTH | Allows applications to connect to paired bluetooth devices. |
| BLUETOOTH_ADMIN | Allows applications to discover and pair bluetooth devices. |
| BLUETOOTH_PRIVILEGED | Allows applications to pair bluetooth devices without user interaction, and to allow or disallow phonebook access or message access. |
| BODY_SENSORS | Allows an application to access data from sensors that the user uses to measure what is happening inside his/her body, such as heart rate. |
| BROADCAST_PACKAGE_REMOVED | Allows an application to broadcast a notification that an application package has been removed. |
| BROADCAST_SMS | Allows an application to broadcast an SMS receipt notification. |
| BROADCAST_STICKY | Allows an application to broadcast sticky intents. |
| BROADCAST_WAP_PUSH | Allows an application to broadcast a WAP PUSH receipt notification. |
| CALL_PHONE | Allows an application to initiate a phone call without going through the Dialer user interface for the user to confirm the call. |
| CALL_PRIVILEGED | Allows an application to call any phone number, including emergency numbers, without going through the Dialer user interface for the user to confirm the call being placed. |
| CAMERA | Required to be able to access the camera device. |
| CAPTURE_AUDIO_OUTPUT | Allows an application to capture audio output. |
| CAPTURE_SECURE_VIDEO_OUTPUT | Allows an application to capture secure video output. |
| CAPTURE_VIDEO_OUTPUT | Allows an application to capture video output. |
| CHANGE_COMPONENT_ENABLED_STATE | Allows an application to change whether an application component (other than its own) is enabled or not. |
| CHANGE_CONFIGURATION | Allows an application to modify the current configuration, such as locale. |
| CHANGE_NETWORK_STATE | Allows applications to change network connectivity state. |
| CHANGE_WIFI_MULTICAST_STATE | Allows applications to enter Wi-Fi Multicast mode. |
| CHANGE_WIFI_STATE | Allows applications to change Wi-Fi connectivity state. |
| CLEAR_APP_CACHE | Allows an application to clear the caches of all installed applications on the device. |
| CONTROL_LOCATION_UPDATES | Allows enabling/disabling location update notifications from the radio. |
| DELETE_CACHE_FILES | Allows an application to delete cache files. |
| DELETE_PACKAGES | Allows an application to delete packages. |
| DIAGNOSTIC | Allows applications to RW to diagnostic resources. |
| DISABLE_KEYGUARD | Allows applications to disable the keyguard if it is not secure. |
| DUMP | Allows an application to retrieve state dump information from system services. |
| EXPAND_STATUS_BAR | Allows an application to expand or collapse the status bar. |
| FACTORY_TEST | Run as a manufacturer test application, running as the root user. |
| FLASHLIGHT | Allows access to the flashlight. |
| GET_ACCOUNTS | Allows access to the list of accounts in the Accounts Service. |
| GET_ACCOUNTS_PRIVILEGED | Allows access to the list of accounts in the Accounts Service. |
| GET_PACKAGE_SIZE | Allows an application to find out the space used by any package. |
| GET_TASKS | This constant was deprecated in API level 21. No longer enforced. |
| GLOBAL_SEARCH | This permission can be used on content providers to allow the global search system to access their data. |
| INSTALL_LOCATION_PROVIDER | Allows an application to install a location provider into the Location Manager. |
| INSTALL_PACKAGES | Allows an application to install packages. |
| INSTALL_SHORTCUT | Allows an application to install a shortcut in Launcher. |
| INTERNET | Allows applications to open network sockets. |
| KILL_BACKGROUND_PROCESSES | Allows an application to call killBackgroundProcesses(String). |
| LOCATION_HARDWARE | Allows an application to use location features in hardware, such as the geofencing api. |
| MANAGE_DOCUMENTS | Allows an application to manage access to documents, usually as part of a document picker. |
| MASTER_CLEAR | Not for use by third-party applications. |
| MEDIA_CONTENT_CONTROL | Allows an application to know what content is playing and control its playback. |
| MODIFY_AUDIO_SETTINGS | Allows an application to modify global audio settings. |
| MODIFY_PHONE_STATE | Allows modification of the telephony state - power on, mmi, etc. |
| MOUNT_FORMAT_FILESYSTEMS | Allows formatting file systems for removable storage. |
| MOUNT_UNMOUNT_FILESYSTEMS | Allows mounting and unmounting file systems for removable storage. |
| NFC | Allows applications to perform I/O operations over NFC. |
| PACKAGE_USAGE_STATS | Allows an application to collect component usage statistics |
| PERSISTENT_ACTIVITY | This constant was deprecated in API level 9. This functionality will be removed in the future; please do not use. Allow an application to make its activities persistent. |
| PROCESS_OUTGOING_CALLS | Allows an application to see the number being dialed during an outgoing call with the option to redirect the call to a different number or abort the call altogether. |
| READ_CALENDAR | Allows an application to read the user's calendar data. |
| READ_CALL_LOG | Allows an application to read the user's call log. |
| READ_CONTACTS | Allows an application to read the user's contacts data. |
| READ_EXTERNAL_STORAGE | Allows an application to read from external storage. |
| READ_FRAME_BUFFER | Allows an application to take screen shots and more generally get access to the frame buffer data. |
| READ_INPUT_STATE | This constant was deprecated in API level 16. The API that used this permission has been removed. |
| READ_LOGS | Allows an application to read the low-level system log files. |
| READ_PHONE_STATE | Allows read only access to phone state. |
| READ_SMS | Allows an application to read SMS messages. |
| READ_SYNC_SETTINGS | Allows applications to read the sync settings. |
| READ_SYNC_STATS | Allows applications to read the sync stats. |
| READ_VOICEMAIL | Allows an application to read voicemails in the system. |
| REBOOT | Required to be able to reboot the device. |
| RECEIVE_BOOT_COMPLETED | Allows an application to receive the ACTION_BOOT_COMPLETED that is broadcast after the system finishes booting. |
| RECEIVE_MMS | Allows an application to monitor incoming MMS messages. |
| RECEIVE_SMS | Allows an application to receive SMS messages. |
| RECEIVE_WAP_PUSH | Allows an application to receive WAP push messages. |
| RECORD_AUDIO | Allows an application to record audio. |
| REORDER_TASKS | Allows an application to change the Z-order of tasks. |
| REQUEST_IGNORE_BATTERY_OPTIMIZATIONS | Permission an application must hold in order to use ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS. |
| REQUEST_INSTALL_PACKAGES | Allows an application to request installing packages. |
| RESTART_PACKAGES | This constant was deprecated in API level 8. The restartPackage(String) API is no longer supported. |
| SEND_RESPOND_VIA_MESSAGE | Allows an application (Phone) to send a request to other applications to handle the respond-via-message action during incoming calls. |
| SEND_SMS | Allows an application to send SMS messages. |
| SET_ALARM | Allows an application to broadcast an Intent to set an alarm for the user. |
| SET_ALWAYS_FINISH | Allows an application to control whether activities are immediately finished when put in the background. |
| SET_ANIMATION_SCALE | Modify the global animation scaling factor. |
| SET_DEBUG_APP | Configure an application for debugging. |
| SET_PREFERRED_APPLICATIONS | This constant was deprecated in API level 7. No longer useful, see addPackageToPreferred(String) for details. |
| SET_PROCESS_LIMIT | Allows an application to set the maximum number of (not needed) application processes that can be running. |
| SET_TIME | Allows applications to set the system time. |
| SET_TIME_ZONE | Allows applications to set the system time zone. |
| SET_WALLPAPER | Allows applications to set the wallpaper. |
| SET_WALLPAPER_HINTS | Allows applications to set the wallpaper hints. |
| SIGNAL_PERSISTENT_PROCESSES | Allow an application to request that a signal be sent to all persistent processes. |
| STATUS_BAR | Allows an application to open, close, or disable the status bar and its icons. |
| SYSTEM_ALERT_WINDOW | Allows an application to open windows using the type TYPE_SYSTEM_ALERT, shown on top of all other applications. |
| TRANSMIT_IR | Allows using the device's IR transmitter, if available. |
| UNINSTALL_SHORTCUT | Allows an application to uninstall a shortcut in Launcher. |
| UPDATE_DEVICE_STATS | Allows an application to update device statistics. |
| USE_FINGERPRINT | Allows an app to use fingerprint hardware. |
| USE_SIP | Allows an application to use SIP service. |
| VIBRATE | Allows access to the vibrator. |
| WAKE_LOCK | Allows using PowerManager WakeLocks to keep processor from sleeping or screen from dimming. |
| WRITE_APN_SETTINGS | Allows applications to write the apn settings. |
| WRITE_CALENDAR | Allows an application to write the user's calendar data. |
| WRITE_CALL_LOG | Allows an application to write (but not read) the user's contacts data. |
| WRITE_CONTACTS | Allows an application to write the user's contacts data. |
| WRITE_EXTERNAL_STORAGE | Allows an application to write to external storage. |
| WRITE_GSERVICES | Allows an application to modify the Google service map. |
| WRITE_SECURE_SETTINGS | Allows an application to read or write the secure system settings. |
| WRITE_SETTINGS | Allows an application to read or write the system settings. |
| WRITE_SYNC_SETTINGS | Allows applications to write the sync settings. |
| WRITE_VOICEMAIL | Allows an application to modify and remove existing voicemails in the system |
【权限列表-中文解释-1】
android.browser.permission.READ_HISTORY_BOOKMARKS 读取浏览器收藏夹和历史记录
android.browser.permission.WRITE_HISTORY_BOOKMARKS 写入浏览器历史记录或收藏夹,但不可读取
android.permission.ACCESS_CHECKIN_PROPERTIES 允许读写访问 "properties"表在checkin数据库中,改值可以修改上传
android.permission.ACCESS_COARSE_LOCATION 通过WiFi或移动基站方式获取经纬度信息,定位精度误差在30~1500米
android.permission.ACCESS_FINE_LOCATION 通过GPS芯片接收卫星的定位信息,定位精度达10米以内
android.permission.ACCESS_LOCATION_EXTRA_COMMANDS 允许应用程序访问额外的位置提供命令
android.permission.ACCESS_MOCK_LOCATION 获取模拟定位信息,一般用于帮助开发者调试应用
android.permission.ACCESS_NETWORK_STATE 获取网络信息状态,如当前的网络连接是否有效
android.permission.ACCESS_SURFACE_FLINGER 底层的图形显示支持,一般用于游戏或相机预览界面的屏幕截图
android.permission.ACCESS_WIFI_STATE 允许程序访问Wi-Fi网络状态信息
android.permission.ACCOUNT_MANAGER 获取账户验证信息,主要为GMail账户信息,只有系统级进程才能访问的
android.permission.ADD_SYSTEM_SERVICE 允许程序发布系统级服务
android.permission.AUTHENTICATE_ACCOUNTS 允许一个程序通过账户验证方式访问账户管理相关信息
android.permission.BATTERY_STATS 允许程序更新手机电池统计信息
android.permission.BIND_APPWIDGET 允许一个程序告诉appWidget服务需要访问小插件的数据库
android.permission.BIND_DEVICE_ADMIN 请求系统管理员接收者receiver,只有系统才能使用
android.permission.BIND_INPUT_METHOD 请求InputMethodService服务,只有系统才能使用
android.permission.BIND_REMOTEVIEWS 必须通过RemoteViewsService服务来请求,只有系统才能用
android.permission.BIND_WALLPAPER 必须通过WallpaperService服务来请求,只有系统才能用
android.permission.BLUETOOTH 允许程序连接到已配对的蓝牙设备
android.permission.BLUETOOTH_ADMIN 允许程序发现和配对蓝牙设备
android.permission.BRICK 能够禁用手机,非常危险,顾名思义就是让手机变成砖头
android.permission.BROADCAST_PACKAGE_REMOVED 允许程序广播一个提示消息在一个应用程序包已经移除后
android.permission.BROADCAST_STICKY 允许一个程序广播常用intents
android.permission.CALL_PHONE 允许一个程序初始化一个电话拨号不需通过拨号 用户界面需要用户确认
android.permission.CALL_PRIVILEGED 允许一个程序拨打任何号码,无需通过拨号用户界面需要用户确认
android.permission.CAMERA 请求访问使用照相设备
android.permission.CELL_PHONE_MASTER_EX 手机优化大师扩展权限
android.permission.CHANGE_COMPONENT_ENABLED_STATE 改变组件是否启用状态
android.permission.CHANGE_CONFIGURATION 允许一个程序修改当前设置,如本地化
android.permission.CHANGE_NETWORK_STATE 改变网络状态如是否能联网
android.permission.CHANGE_WIFI_MULTICAST_STATE 改变WiFi多播状态
android.permission.CHANGE_WIFI_STATE 允许程序改变Wi-Fi连接状态
android.permission.CLEAR_APP_CACHE 清除应用缓存
android.permission.CLEAR_APP_USER_DATA 清除应用的用户数据
android.permission.CONTROL_LOCATION_UPDATES 允许获得移动网络定位信息改变
android.permission.CWJ_GROUP 允许CWJ账户组访问底层信息
android.permission.DELETE_CACHE_FILES 允许程序删除缓存文件
android.permission.DELETE_PACKAGES 允许程序删除应用
android.permission.DEVICE_POWER 允许访问底层电源管理
android.permission.DIAGNOSTIC 允许程序RW诊断资源
android.permission.DISABLE_KEYGUARD 允许程序禁用键盘锁
android.permission.DUMP 允许程序返回状态抓取信息从系统服务
android.permission.EXPAND_STATUS_BAR 允许程序扩展收缩在状态栏,应该是类似Windows Mobile中的托盘程序
android.permission.FACTORY_TEST 作为一个工厂测试程序,运行在root用户
android.permission.FLASHLIGHT 访问闪光灯,HTC Dream不包含闪光灯
android.permission.FORCE_BACK 允许程序强行一个后退操作是否在顶层activities
android.permission.FOTA_UPDATE 暂时不了解这是做什么使用的,可能是一个预留权限
android.permission.GET_ACCOUNTS 访问GMail账户列表
android.permission.GET_PACKAGE_SIZE 允许一个程序获取任何package占用空间容量
android.permission.GET_TASKS 允许一个程序获取信息有关当前或最近运行的任务
android.permission.GLOBAL_SEARCH 允许程序使用全局搜索功能
android.permission.HARDWARE_TEST 访问硬件辅助设备,用于硬件测试
android.permission.INJECT_EVENTS 允许一个程序截获用户事件如按键、触 摸、轨迹球等等到一个时间流
android.permission.INSTALL_LOCATION_PROVIDER 安装定位提供
android.permission.INSTALL_PACKAGES 允许程序安装应用
android.permission.INTERNAL_SYSTEM_WINDOW 允许程序打开内部窗口,不对第三方应用程序开放此权限
android.permission.INTERNET 访问网络连接,可能产生GPRS流量
android.permission.KILL_BACKGROUND_PROCESSES 允许程序调用killBackgroundProcesses(String).方法结束后台进程
android.permission.MANAGE_ACCOUNTS 允许程序管理AccountManager中的账户列表
android.permission.MANAGE_APP_TOKENS 管理创建、摧毁、Z轴顺序,仅用于系统
android.permission.MASTER_CLEAR 允许程序执行软格式化,删除系统配置信息
android.permission.MODIFY_AUDIO_SETTINGS 修改声音设置信息
android.permission.MODIFY_PHONE_STATE 修改电话状态,如飞行模式,但不包含替换系统拨号器界面
android.permission.MOUNT_FORMAT_FILESYSTEMS 格式化可移动文件系统,比如格式化清空SD卡
android.permission.MOUNT_UNMOUNT_FILESYSTEMS 挂载、反挂载外部文件系统
android.permission.MTWEAK_FORUM 允许使用mTweak社区权限
android.permission.MTWEAK_USER 允许mTweak用户访问高级系统权限
android.permission.NFC 允许程序执行NFC近距离通讯操作,用于移动支持
android.permission.PERSISTENT_ACTIVITY 创建一个永久的Activity,该功能标记为将来将被移除
android.permission.PROCESS_OUTGOING_CALLS 允许程序监视,修改或放弃播出电话
android.permission.READ_CALENDAR 允许程序读取用户的日程信息
android.permission.READ_CONTACTS 允许应用访问联系人通讯录信息
android.permission.READ_FRAME_BUFFER 读取帧缓存用于屏幕截图
android.permission.READ_INPUT_STATE 读取当前键的输入状态,仅用于系统
android.permission.READ_LOGS 允许程序读取底层系统日志文件
android.permission.READ_OWNER_DATA 允许程序读取所有者数据
android.permission.READ_PHONE_STATE 访问电话状态
android.permission.READ_SMS 允许程序读取短信息
android.permission.READ_SYNC_SETTINGS 读取同步设置,读取Google在线同步设置
android.permission.READ_SYNC_STATS 读取同步状态,获得Google在线同步状态
android.permission.REBOOT 允许程序重新启动设备
android.permission.RECEIVE_BOOT_COMPLETED 允许程序开机自动运行
android.permission.RECEIVE_MMS 接收彩信
android.permission.RECEIVE_SMS 接收短信
android.permission.RECEIVE_WAP_PUSH 接收WAP PUSH信息
android.permission.RECORD_AUDIO 录制声音通过手机或耳机的麦克
android.permission.REORDER_TASKS 允许程序改变Z轴排列任务
android.permission.RESTART_PACKAGES 结束任务通过restartPackage(String)方法,该方式将在外来放弃
android.permission.SEND_SMS 发送短信
android.permission.SET_ACTIVITY_WATCHER 设置Activity观察器一般用于monkey测试
android.permission.SET_ALWAYS_FINISH 设置程序在后台是否总是退出
android.permission.SET_ANIMATION_SCALE 设置全局动画缩放
android.permission.SET_DEBUG_APP 设置调试程序,一般用于开发
android.permission.SET_ORIENTATION 设置屏幕方向为横屏或标准方式显示,不用于普通应用
android.permission.SET_PREFERRED_APPLICATIONS 设置应用的参数,已不再工作具体查看addPackageToPreferred() 介绍
android.permission.SET_PROCESS_FOREGROUND 允许程序当前运行程序强行到前台
android.permission.SET_PROCESS_LIMIT 允许程序设置最大的进程数量的限制
android.permission.SET_TIME 设置系统时间
android.permission.SET_TIME_ZONE 设置系统时区
android.permission.SET_WALLPAPER 允许程序设置壁纸
android.permission.SET_WALLPAPER_HINTS 允许程序设置壁纸hits
android.permission.SIGNAL_PERSISTENT_PROCESSES 允许程序请求发送信号到所有显示的进程中
android.permission.STATUS_BAR 允许程序打开、关闭或禁用状态栏及图标
android.permission.SUBSCRIBED_FEEDS_READ 允许一个程序访问订阅RSS Feed内容提供
android.permission.SUBSCRIBED_FEEDS_WRITE 写入或修改订阅内容的数据库
android.permission.SYSTEM_ALERT_WINDOW 显示系统窗口
android.permission.UPDATE_DEVICE_STATS 更新设备状态
android.permission.USE_CREDENTIALS 允许程序请求验证从AccountManager
android.permission.USE_SIP 允许程序使用SIP视频服务
android.permission.VIBRATE 允许振动
android.permission.WAKE_LOCK 允许程序在手机屏幕关闭后后台进程仍然运行
android.permission.WRITE_APN_SETTINGS 写入网络GPRS接入点设置
android.permission.WRITE_CALENDAR 写入日程,但不可读取
android.permission.WRITE_CONTACTS 写入联系人,但不可读取
android.permission.WRITE_EXTERNAL_STORAGE 允许程序写入外部存储,如SD卡上写文件
android.permission.WRITE_GSERVICES 允许程序写入Google Map服务数据
android.permission.WRITE_OWNER_DATA 允许一个程序写入但不读取所有者数据
android.permission.WRITE_SECURE_SETTINGS 允许程序读写系统安全敏感的设置项
android.permission.WRITE_SETTINGS 允许程序读取或写入系统设置
android.permission.WRITE_SMS 允许程序写短信
android.permission.WRITE_SYNC_SETTINGS 允许程序写入同步设置
com.android.alarm.permission.SET_ALARM 设置闹铃提醒
【权限列表-中文解释-2】
|
访问登记属性
| android.permission.ACCESS_CHECKIN_PROPERTIES ,读取或写入登记check-in数据库属性表的权限 |
| 获取错略位置 | android.permission.ACCESS_COARSE_LOCATION,通过WiFi或移动基站的方式获取用户错略的经纬度信息,定位精度大概误差在30~1500米 |
| 获取精确位置 | android.permission.ACCESS_FINE_LOCATION,通过GPS芯片接收卫星的定位信息,定位精度达10米以内 |
| 访问定位额外命令 | android.permission.ACCESS_LOCATION_EXTRA_COMMANDS,允许程序访问额外的定位提供者指令 |
| 获取模拟定位信息 | android.permission.ACCESS_MOCK_LOCATION,获取模拟定位信息,一般用于帮助开发者调试应用 |
| 获取网络状态 | android.permission.ACCESS_NETWORK_STATE,获取网络信息状态,如当前的网络连接是否有效 |
| 访问Surface Flinger | android.permission.ACCESS_SURFACE_FLINGER,Android平台上底层的图形显示支持,一般用于游戏或照相机预览界面和底层模式的屏幕截图 |
| 获取WiFi状态 | android.permission.ACCESS_WIFI_STATE,获取当前WiFi接入的状态以及WLAN热点的信息 |
| 账户管理 | android.permission.ACCOUNT_MANAGER,获取账户验证信息,主要为GMail账户信息,只有系统级进程才能访问的权限 |
| 验证账户 | android.permission.AUTHENTICATE_ACCOUNTS,允许一个程序通过账户验证方式访问账户管理ACCOUNT_MANAGER相关信息 |
| 电量统计 | android.permission.BATTERY_STATS,获取电池电量统计信息 |
| 绑定小插件 | android.permission.BIND_APPWIDGET,允许一个程序告诉appWidget服务需要访问小插件的数据库,只有非常少的应用才用到此权限 |
| 绑定设备管理 | android.permission.BIND_DEVICE_ADMIN,请求系统管理员接收者receiver,只有系统才能使用 |
| 绑定输入法 | android.permission.BIND_INPUT_METHOD ,请求InputMethodService服务,只有系统才能使用 |
| 绑定RemoteView | android.permission.BIND_REMOTEVIEWS,必须通过RemoteViewsService服务来请求,只有系统才能用 |
| 绑定壁纸 | android.permission.BIND_WALLPAPER,必须通过WallpaperService服务来请求,只有系统才能用 |
| 使用蓝牙 | android.permission.BLUETOOTH,允许程序连接配对过的蓝牙设备 |
| 蓝牙管理 | android.permission.BLUETOOTH_ADMIN,允许程序进行发现和配对新的蓝牙设备 |
| 禁止手机使用 | android.permission.BRICK,能够禁用手机,非常危险,顾名思义就是让手机变成砖头 |
| 应用删除时广播 | android.permission.BROADCAST_PACKAGE_REMOVED,当一个应用在删除时触发一个广播 |
| 收到短信时广播 | android.permission.BROADCAST_SMS,当收到短信时触发一个广播 |
| 连续广播 | android.permission.BROADCAST_STICKY,允许一个程序收到广播后快速收到下一个广播 |
| WAP PUSH广播 | android.permission.BROADCAST_WAP_PUSH,WAP PUSH服务收到后触发一个广播 |
| 拨打电话 | android.permission.CALL_PHONE,允许程序从非系统拨号器里输入电话号码 |
| 通话权限 | android.permission.CALL_PRIVILEGED,允许程序拨打电话,替换系统的拨号器界面 |
| 拍照权限 | android.permission.CAMERA,允许访问摄像头进行拍照 |
| 改变组件状态 | android.permission.CHANGE_COMPONENT_ENABLED_STATE,改变组件是否启用状态 |
| 改变配置 | android.permission.CHANGE_CONFIGURATION,允许当前应用改变配置,如定位 |
| 改变网络状态 | android.permission.CHANGE_NETWORK_STATE,改变网络状态如是否能联网 |
| 改变WiFi多播状态 | android.permission.CHANGE_WIFI_MULTICAST_STATE,改变WiFi多播状态 |
| 改变WiFi状态 | android.permission.CHANGE_WIFI_STATE,改变WiFi状态 |
| 清除应用缓存 | android.permission.CLEAR_APP_CACHE,清除应用缓存 |
| 清除用户数据 | android.permission.CLEAR_APP_USER_DATA,清除应用的用户数据 |
| 底层访问权限 | android.permission.CWJ_GROUP,允许CWJ账户组访问底层信息 |
| 手机优化大师扩展权限 | android.permission.CELL_PHONE_MASTER_EX,手机优化大师扩展权限 |
| 控制定位更新 | android.permission.CONTROL_LOCATION_UPDATES,允许获得移动网络定位信息改变 |
| 删除缓存文件 | android.permission.DELETE_CACHE_FILES,允许应用删除缓存文件 |
| 删除应用 | android.permission.DELETE_PACKAGES,允许程序删除应用 |
| 电源管理 | android.permission.DEVICE_POWER,允许访问底层电源管理 |
| 应用诊断 | android.permission.DIAGNOSTIC,允许程序到RW到诊断资源 |
| 禁用键盘锁 | android.permission.DISABLE_KEYGUARD,允许程序禁用键盘锁 |
| 转存系统信息 | android.permission.DUMP,允许程序获取系统dump信息从系统服务 |
| 状态栏控制 | android.permission.EXPAND_STATUS_BAR,允许程序扩展或收缩状态栏 |
| 工厂测试模式 | android.permission.FACTORY_TEST,允许程序运行工厂测试模式 |
| 使用闪光灯 | android.permission.FLASHLIGHT,允许访问闪光灯 |
| 强制后退 | android.permission.FORCE_BACK,允许程序强制使用back后退按键,无论Activity是否在顶层 |
| 访问账户Gmail列表 | android.permission.GET_ACCOUNTS,访问GMail账户列表 |
| 获取应用大小 | android.permission.GET_PACKAGE_SIZE,获取应用的文件大小 |
| 获取任务信息 | android.permission.GET_TASKS,允许程序获取当前或最近运行的应用 |
| 允许全局搜索 | android.permission.GLOBAL_SEARCH,允许程序使用全局搜索功能 |
| 硬件测试 | android.permission.HARDWARE_TEST,访问硬件辅助设备,用于硬件测试 |
| 注射事件 | android.permission.INJECT_EVENTS,允许访问本程序的底层事件,获取按键、轨迹球的事件流 |
| 安装定位提供 | android.permission.INSTALL_LOCATION_PROVIDER,安装定位提供 |
| 安装应用程序 | android.permission.INSTALL_PACKAGES,允许程序安装应用 |
| 内部系统窗口 | android.permission.INTERNAL_SYSTEM_WINDOW,允许程序打开内部窗口,不对第三方应用程序开放此权限 |
| 访问网络 | android.permission.INTERNET,访问网络连接,可能产生GPRS流量 |
| 结束后台进程 | android.permission.KILL_BACKGROUND_PROCESSES,允许程序调用killBackgroundProcesses(String).方法结束后台进程 |
| 管理账户 | android.permission.MANAGE_ACCOUNTS,允许程序管理AccountManager中的账户列表 |
| 管理程序引用 | android.permission.MANAGE_APP_TOKENS,管理创建、摧毁、Z轴顺序,仅用于系统 |
| 高级权限 | android.permission.MTWEAK_USER,允许mTweak用户访问高级系统权限 |
| 社区权限 | android.permission.MTWEAK_FORUM,允许使用mTweak社区权限 |
| 软格式化 | android.permission.MASTER_CLEAR,允许程序执行软格式化,删除系统配置信息 |
| 修改声音设置 | android.permission.MODIFY_AUDIO_SETTINGS,修改声音设置信息 |
| 修改电话状态 | android.permission.MODIFY_PHONE_STATE,修改电话状态,如飞行模式,但不包含替换系统拨号器界面 |
| 格式化文件系统 | android.permission.MOUNT_FORMAT_FILESYSTEMS,格式化可移动文件系统,比如格式化清空SD卡 |
| 挂载文件系统 | android.permission.MOUNT_UNMOUNT_FILESYSTEMS,挂载、反挂载外部文件系统 |
| 允许NFC通讯 | android.permission.NFC,允许程序执行NFC近距离通讯操作,用于移动支持 |
| 永久Activity | android.permission.PERSISTENT_ACTIVITY,创建一个永久的Activity,该功能标记为将来将被移除 |
| 处理拨出电话 | android.permission.PROCESS_OUTGOING_CALLS,允许程序监视,修改或放弃播出电话 |
| 读取日程提醒 | android.permission.READ_CALENDAR,允许程序读取用户的日程信息 |
| 读取联系人 | android.permission.READ_CONTACTS,允许应用访问联系人通讯录信息 |
| 屏幕截图 | android.permission.READ_FRAME_BUFFER,读取帧缓存用于屏幕截图 |
| 读取收藏夹和历史记录 | com.android.browser.permission.READ_HISTORY_BOOKMARKS,读取浏览器收藏夹和历史记录 |
| 读取输入状态 | android.permission.READ_INPUT_STATE,读取当前键的输入状态,仅用于系统 |
| 读取系统日志 | android.permission.READ_LOGS,读取系统底层日志 |
| 读取电话状态 | android.permission.READ_PHONE_STATE,访问电话状态 |
| 读取短信内容 | android.permission.READ_SMS,读取短信内容 |
| 读取同步设置 | android.permission.READ_SYNC_SETTINGS,读取同步设置,读取Google在线同步设置 |
| 读取同步状态 | android.permission.READ_SYNC_STATS,读取同步状态,获得Google在线同步状态 |
| 重启设备 | android.permission.REBOOT,允许程序重新启动设备 |
| 开机自动允许 | android.permission.RECEIVE_BOOT_COMPLETED,允许程序开机自动运行 |
| 接收彩信 | android.permission.RECEIVE_MMS,接收彩信 |
| 接收短信 | android.permission.RECEIVE_SMS,接收短信 |
| 接收Wap Push | android.permission.RECEIVE_WAP_PUSH,接收WAP PUSH信息 |
| 录音 | android.permission.RECORD_AUDIO,录制声音通过手机或耳机的麦克 |
| 排序系统任务 | android.permission.REORDER_TASKS,重新排序系统Z轴运行中的任务 |
| 结束系统任务 | android.permission.RESTART_PACKAGES,结束任务通过restartPackage(String)方法,该方式将在外来放弃 |
| 发送短信 | android.permission.SEND_SMS,发送短信 |
| 设置Activity观察其 | android.permission.SET_ACTIVITY_WATCHER,设置Activity观察器一般用于monkey测试 |
| 设置闹铃提醒 | com.android.alarm.permission.SET_ALARM,设置闹铃提醒 |
| 设置总是退出 | android.permission.SET_ALWAYS_FINISH,设置程序在后台是否总是退出 |
| 设置动画缩放 | android.permission.SET_ANIMATION_SCALE,设置全局动画缩放 |
| 设置调试程序 | android.permission.SET_DEBUG_APP,设置调试程序,一般用于开发 |
| 设置屏幕方向 | android.permission.SET_ORIENTATION,设置屏幕方向为横屏或标准方式显示,不用于普通应用 |
| 设置应用参数 | android.permission.SET_PREFERRED_APPLICATIONS,设置应用的参数,已不再工作具体查看addPackageToPreferred(String) 介绍 |
| 设置进程限制 | android.permission.SET_PROCESS_LIMIT,允许程序设置最大的进程数量的限制 |
| 设置系统时间 | android.permission.SET_TIME,设置系统时间 |
| 设置系统时区 | android.permission.SET_TIME_ZONE,设置系统时区 |
| 设置桌面壁纸 | android.permission.SET_WALLPAPER,设置桌面壁纸 |
| 设置壁纸建议 | android.permission.SET_WALLPAPER_HINTS,设置壁纸建议 |
| 发送永久进程信号 | android.permission.SIGNAL_PERSISTENT_PROCESSES,发送一个永久的进程信号 |
| 状态栏控制 | android.permission.STATUS_BAR,允许程序打开、关闭、禁用状态栏 |
| 访问订阅内容 | android.permission.SUBSCRIBED_FEEDS_READ,访问订阅信息的数据库 |
| 写入订阅内容 | android.permission.SUBSCRIBED_FEEDS_WRITE,写入或修改订阅内容的数据库 |
| 显示系统窗口 | android.permission.SYSTEM_ALERT_WINDOW,显示系统窗口 |
| 更新设备状态 | android.permission.UPDATE_DEVICE_STATS,更新设备状态 |
| 使用证书 | android.permission.USE_CREDENTIALS,允许程序请求验证从AccountManager |
| 使用SIP视频 | android.permission.USE_SIP,允许程序使用SIP视频服务 |
| 使用振动 | android.permission.VIBRATE,允许振动 |
| 唤醒锁定 | android.permission.WAKE_LOCK,允许程序在手机屏幕关闭后后台进程仍然运行 |
| 写入GPRS接入点设置 | android.permission.WRITE_APN_SETTINGS,写入网络GPRS接入点设置 |
| 写入日程提醒 | android.permission.WRITE_CALENDAR,写入日程,但不可读取 |
| 写入联系人 | android.permission.WRITE_CONTACTS,写入联系人,但不可读取 |
| 写入外部存储 | android.permission.WRITE_EXTERNAL_STORAGE,允许程序写入外部存储,如SD卡上写文件 |
| 写入Google地图数据 | android.permission.WRITE_GSERVICES,允许程序写入Google Map服务数据 |
| 写入收藏夹和历史记录 | com.android.browser.permission.WRITE_HISTORY_BOOKMARKS,写入浏览器历史记录或收藏夹,但不可读取 |
| 读写系统敏感设置 | android.permission.WRITE_SECURE_SETTINGS,允许程序读写系统安全敏感的设置项 |
| 读写系统设置 | android.permission.WRITE_SETTINGS,允许读写系统设置项 |
| 编写短信 | android.permission.WRITE_SMS,允许编写短信 |
| 写入在线同步设置 | android.permission.WRITE_SYNC_SETTINGS,写入Google在线同步设置 |
2017-7-1
4020

被折叠的 条评论
为什么被折叠?



