Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android技術 >> Android開發 >> 初級開發 >> Android平台上的權限

Android平台上的權限

編輯:初級開發

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"
  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved