Android权限分的很细,但命名比较人性化,Android permission比Symbian Capabilities有了不少改进,下面就来看看权限许可都有哪些定义吧,发现还是比较繁多的,如果发现你的程序某个地方调试错误很可能是Android permission的访问控制在作怪,这也是为了安全防止手机成为病毒的场所。Android开发网获取到的消息来看不用购买高昂的数字签名证书,权限许可权由用户决定而不是手机制造商和平台提供商,这一点不得不说明为Android开发人员着想,下面的信息都是需要添加在androidmanifest.xml文件中。
ACCESS_COARSE_LOCATION是有关错略的位置信息获取,比如说MyLocation API调用获取的Cellid等定位信息必需添加android.permission.ACCESS_COARSE_LOCATION这个声明
ACCESS_FINE_LOCATION、ACCESS_LOCATION_EXTRA_COMMANDS、ACCESS_MOCK_LOCATION是有关GPS定位获取的信息使用GPS LocationProvider类的相关定位信息必需声明android.permission.ACCESS_FINE_LOCATION、android.permission.ACCESS_LOCATION_EXTRA_COMMANDS和android.permission.ACCESS_MOCK_LOCATION
ACCESS_NETWORK_STATE是获取网络状态的权限控制,如果获取当前GSM网络相关信息必需在androidmanifest.xml中声明android.permission.ACCESS_NETWORK_STATE这句。
ACCESS_SURFACE_FLINGER是使用SurfaceFlinger底层API的令牌,必需声明android.permission.ACCESS_SURFACE_FLINGER
ACCESS_WIFI_STATE权限可以获取使用Wi-Fi等WLAN无线网络,加入android.permission.ACCESS_WIFI_STATE这句
ADD_SYSTEM_SERVICE是系统服务数据库的管理权限,比如添加一个系统服务必需声明android.permission.ADD_SYSTEM_SERVICE
BATTERY_STATS是获取Android平台上电池设备的权限令牌,必需声明android.permission.BATTERY_STATS才可以获得电池信息
BLUETOOTH蓝牙信息类,获取相关的蓝牙信息必声明android.permission.BLUETOOTH
BLUETOOTH_ADMIN是蓝牙管理权限包含了身份安全认证,必需添加android.permission.BLUETOOTH_ADMIN类
BRICK "android.permission.BRICK"
BROADCAST_PACKAGE_REMOVED是广播包移除类权限,可以移除指定的系统消息,必需声明android.permission.BROADCAST_PACKAGE_REMOVED这句
BROADCAST_STICKY "android.permission.BROADCAST_STICKY"
CALL_PHONE是允许Android手机拨打电话时使用的权限 "android.permission.CALL_PHONE"
CALL_PRIVILEGED "android.permission.CALL_PRIVILEGED"
CAMERA是摄像头权限控制,可以管理照相功能的启用 "android.permission.CAMERA"
CHANGE_COMPONENT_ENABLED_STATE "android.permission.CHANGE_COMPONENT_ENABLED_STATE"
CHANGE_CONFIGURATION是控制Android系统设置等敏感信息的权限,修改时必需有android.permission.CHANGE_CONFIGURATION声明。
CHANGE_NETWORK_STATE "android.permission.CHANGE_NETWORK_STATE"
CHANGE_WIFI_STATE是改变WLAN状态的开关,如果打开或关闭Wi-Fi必需加入android.permission.CHANGE_WIFI_STATE的声明。
CLEAR_APP_CACHE清除程序缓存也是需要权限的,不要忘了包含android.permission.CLEAR_APP_CACHE这句
CLEAR_APP_USER_DATA "android.permission.CLEAR_APP_USER_DATA"
DELETE_CACHE_FILES "android.permission.DELETE_CACHE_FILES"
DELETE_PACKAGES "android.permission.DELETE_PACKAGES"
DEVICE_POWER "android.permission.DEVICE_POWER"
DISABLE_KEYGUARD "android.permission.DISABLE_KEYGUARD"
DUMP "android.permission.DUMP"
EXPAND_STATUS_BAR "android.permission.EXPAND_STATUS_BAR"
FACTORY_TEST "android.permission.FACTORY_TEST"
FLASHLIGHT "android.permission.FLASHLIGHT"
FORCE_BACK "android.permission.FORCE_BACK"
FOTA_UPDATE "android.permission.FOTA_UPDATE"
GET_ACCOUNTS "android.permission.GET_ACCOUNTS"
GET_PACKAGE_SIZE "android.permission.GET_PACKAGE_SIZE"
GET_TASKS "android.permission.GET_TASKS"
HARDWARE_TEST "android.permission.HARDWARE_TEST"
INJECT_EVENTS "android.permission.INJECT_EVENTS"
INSTALL_PACKAGES "android.permission.INSTALL_PACKAGES"
INTERNAL_SYSTEM_WINDOW "android.permission.INTERNAL_SYSTEM_WINDOW"
INTERNET "android.permission.INTERNET"
MANAGE_APP_TOKENS "android.permission.MANAGE_APP_TOKENS"
MASTER_CLEAR "android.permission.MASTER_CLEAR"
MODIFY_AUDIO_SETTINGS "android.permission.MODIFY_AUDIO_SETTINGS"
MODIFY_PHONE_STATE "android.permission.MODIFY_PHONE_STATE"
MOUNT_UNMOUNT_FILESYSTEMS "android.permission.MOUNT_UNMOUNT_FILESYSTEMS"
PERSISTENT_ACTIVITY "android.permission.PERSISTENT_ACTIVITY"
PROCESS_OUTGOING_CALLS "android.permission.PROCESS_OUTGOING_CALLS"
READ_CALENDAR "android.permission.READ_CALENDAR"
READ_CONTACTS "android.permission.READ_CONTACTS"
READ_FRAME_BUFFER "android.permission.READ_FRAME_BUFFER"
READ_INPUT_STATE "android.permission.READ_INPUT_STATE"
READ_LOGS "android.permission.READ_LOGS"
READ_OWNER_DATA "android.permission.READ_OWNER_DATA"
READ_PHONE_STATE "android.permission.READ_PHONE_STATE"
READ_SMS "android.permission.READ_SMS"
READ_SYNC_SETTINGS "android.permission.READ_SYNC_SETTINGS"
READ_SYNC_STATS "android.permission.READ_SYNC_STATS"
RECEIVE_BOOT_COMPLETED一般用于自启动程序的声明,当Android系统启动时会发送这个广播,所以自启动程序必需声明android.permission.RECEIVE_BOOT_COMPLETED才可以正常运行
RECEIVE_MMS "android.permission.RECEIVE_MMS"
RECEIVE_SMS "android.permission.RECEIVE_SMS"
RECEIVE_WAP_PUSH "android.permission.RECEIVE_WAP_PUSH"
RECORD_AUDIO "android.permission.RECORD_AUDIO"
REORDER_TASKS "android.permission.REORDER_TASKS"
RESTART_PACKAGES "android.permission.RESTART_PACKAGES"
SEND_SMS "android.permission.SEND_SMS"
SET_ACTIVITY_WATCHER "android.permission.SET_ACTIVITY_WATCHER"
SET_ALWAYS_FINISH "android.permission.SET_ALWAYS_FINISH"
SET_ANIMATION_SCALE "android.permission.SET_ANIMATION_SCALE"
SET_DEBUG_APP "android.permission.SET_DEBUG_APP"
SET_ORIENTATION "android.permission.SET_ORIENTATION"
SET_PREFERRED_APPLICATIONS "android.permission.SET_PREFERRED_APPLICATIONS"
SET_PROCESS_FOREGROUND "android.permission.SET_PROCESS_FOREGROUND"
SET_PROCESS_LIMIT "android.permission.SET_PROCESS_LIMIT"
SET_TIME_ZONE "android.permission.SET_TIME_ZONE"
SET_WALLPAPER "android.permission.SET_WALLPAPER"
SET_WALLPAPER_HINTS "android.permission.SET_WALLPAPER_HINTS"
SIGNAL_PERSISTENT_PROCESSES "android.permission.SIGNAL_PERSISTENT_PROCESSES"
STATUS_BAR "android.permission.STATUS_BAR"
SYSTEM_ALERT_WINDOW "android.permission.SYSTEM_ALERT_WINDOW"
VIBRATE "android.permission.VIBRATE"
WAKE_LOCK "android.permission.WAKE_LOCK"
WRITE_CALENDAR "android.permission.WRITE_CALENDAR"
WRITE_CONTACTS "android.permission.WRITE_CONTACTS"
WRITE_OWNER_DATA "android.permission.WRITE_OWNER_DATA"
WRITE_SETTINGS "android.permission.WRITE_SETTINGS"
WRITE_SMS "android.permission.WRITE_SMS"
WRITE_SYNC_SETTINGS "android.permission.WRITE_SYNC_SETTINGS"