android运行时权限

不需要动态申请的权限

这些权限在清单文件AndroidManifest.xml中声明即可,用户不能主动取消授权,除非卸载该App

ACCESS_LOCATION_EXTRA_COMMANDS
ACCESS_NETWORK_STATE
ACCESS_NOTIFICATION_POLICY
ACCESS_WIFI_STATE
BLUETOOTH
BLUETOOTH_ADMIN
BROADCAST_STICKY
CHANGE_NETWORK_STATE
CHANGE_WIFI_MULTICAST_STATE
CHANGE_WIFI_STATE
DISABLE_KEYGUARD
EXPAND_STATUS_BAR
GET_PACKAGE_SIZE
INSTALL_SHORTCUT
INTERNET
KILL_BACKGROUND_PROCESSES
MODIFY_AUDIO_SETTINGS
NFC
READ_SYNC_SETTINGS
READ_SYNC_STATS
RECEIVE_BOOT_COMPLETED
REORDER_TASKS
REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
REQUEST_INSTALL_PACKAGES
SET_ALARM
SET_TIME_ZONE
SET_WALLPAPER
SET_WALLPAPER_HINTS
TRANSMIT_IR
UNINSTALL_SHORTCUT
USE_FINGERPRINT
VIBRATE
WAKE_LOCK
WRITE_SYNC_SETTINGS

需要动态申请的权限

如果Android系统的版本在 6.0或者更高系统中,并且targetSdkVersion>=23的时候时,系统会使用动态权限方式让用户授权
申请动态权限的时候, 系统会弹出一个授权对话框, 提示用户授权;

CALENDAR(日历)READ_CALENDAR
WRITE_CALENDAR

CAMERA(相机)CAMERA

CONTACTS(联系人)READ_CONTACTS
WRITE_CONTACTS
GET_ACCOUNTS

LOCATION(位置)ACCESS_FINE_LOCATION
ACCESS_COARSE_LOCATION

MICROPHONE(麦克风)RECORD_AUDIO

PHONE(手机)READ_PHONE_STATE
CALL_PHONE
READ_CALL_LOG
WRITE_CALL_LOG
ADD_VOICEMAIL
USE_SIP
PROCESS_OUTGOING_CALLS

SENSORS(传感器)BODY_SENSORS

SMS(短信)SEND_SMS
RECEIVE_SMS
READ_SMS
RECEIVE_WAP_PUSH
RECEIVE_MMS

STORAGE(存储卡)READ_EXTERNAL_STORAGE
WRITE_EXTERNAL_STORAGE

你可能感兴趣的:(android运行时权限)