Android app 權限

1.Manifest文件中放置權限聲明的位置:


<uses-sdk
       android:minSdkVersion="8"
       android:targetSdkVersion="17" />
   <uses-permission android:name="android.permission.INTERNET" />
   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
   <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
   <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
   <uses-permission android:name="android.permission.WRITE_USER_DICTIONARY" />
   <uses-permission android:name="android.permission.READ_CONTACTS" />
   <application
       android:allowBackup="true"
       android:icon="@drawable/ic_launcher"
       android:label="@string/app_name"
       android:theme="@style/AppTheme" >


2.Android app常用權限說明:



android.permission.ACCESS_COARSE_LOCATION

允許一個程序訪問CellID或WiFi熱點來獲取粗略的位置(Allows an application to access coarse (e.g., Cell-ID, WiFi)location)

android.permission.ACCESS_FINE_LOCATION

允許一個程序訪問精良位置(如GPS)

(Allows an application to access fine(e.g., GPS) location)


android.permission.ACCESS_MOCK_LOCATION

允許程序創建模擬位置提供用於測試(Allows an application to create mock location providers fortesting)

android.permission.ACCESS_NETWORK_STATE

允許程序訪問有關GSM網絡信息

(Allows applications to accessinformation about networks)


android.permission.ACCESS_WIFI_STATE

允許程序訪問Wi-Fi網絡狀態信息

(Allows applications to accessinformation about Wi-Fi networks)

android.permission.BROADCAST_PACKAGE_REMOVED

允許程序廣播一個提示消息在一個應用程序包已經移除後(Allows an application to broadcast a notification that anapplication package has been removed)

android.permission.BROADCAST_STICKY

允許一個程序廣播常用

intents(Allows an application to broadcast sticky intents)

android.permission.CALL_PHONE

允許一個程序初始化一個電話撥號不需通過撥號用戶界面需要用戶確認(Allows an application to initiate a phone call without goingthrough the Dialer user interface for the user to confirm the call beingplaced.)

android.permission.CALL_PRIVILEGED

允許一個程序撥打任何號碼,包含緊急號碼無需通過撥號用戶界面需要用戶確認(Allows an application to call any phone number, including emergencynumbers, without going through the Dialer user interface for the user toconfirm the call being placed)

android.permission.CAMERA

請求訪問使用照相設備(Required to be able to access the camera device. )

android.permission.CHANGE_CONFIGURATION

允許一個程序修改當前設置,如本地化(Allows an application to modify the current configuration, such aslocale. )

android.permission.CHANGE_NETWORK_STATE

允許程序改變網絡連接狀態

(Allows applications to change network connectivity state)

android.permission.CHANGE_WIFI_STATE

允許程序改變Wi-Fi連接狀態

(Allows applications to changeWi-Fi connectivity state)
 

android.permission.HARDWARE_TEST

允許訪問硬件

(Allows access to hardware peripherals. )


android.permission.INJECT_EVENTS

允許一個程序截獲用戶事件如按鍵、觸摸、軌跡球等等到一個時間流,hook技術(Allows an application to inject user events (keys, touch, trackball)into the event stream and deliver them to ANY window.)
 

android.permission.INTERNET

允許程序打開網絡套接字

(Allows applications to open network sockets)


android.permission.MOUNT_UNMOUNT_FILESYSTEMS

允許掛載和反掛載文件系統可移動存儲(Allows mounting and unmounting file systems for removable storage.)


android.permission.PROCESS_OUTGOING_CALLS

允許程序監視、修改有關播出電話(Allows an application to monitor, modify, or abort outgoing calls)


android.permission.READ_CALENDAR

允許程序讀取用戶日曆數據

(Allows an application to read the user's calendar data.)


android.permission.READ_CONTACTS

允許程序讀取用戶聯繫人數據(Allows an application to read the user's contacts data.)


android.permission.READ_LOGS

允許程序讀取底層系統日誌文件

(Allows an application to read the low-level system log files. )


android.permission.READ_OWNER_DATA

允許程序讀取所有者數據

(Allows an application to read the owner's data)


android.permission.READ_SMS

允許程序讀取短信息

(Allows an application to read SMS messages.)
 


android.permission.RECEIVE_BOOT_COMPLETED

允許一個程序接收到 ACTION_BOOT_COMPLETED廣播在系統完成啓動(Allows anapplication to receive the ACTION_BOOT_COMPLETED that is broadcast after thesystem finishes booting. )


android.permission.RECEIVE_MMS

允許一個程序監控將收到MMS彩信,記錄或處理(Allowsan application to monitor incoming MMS messages, to record or performprocessing on them. )


android.permission.RECEIVE_SMS

允許程序監控一個將收到短信息,記錄或處理(Allows an application to monitor incoming SMS messages, to record orperform processing on them.)

android.permission.RECORD_AUDIO

允許程序錄制音頻

(Allows an application to record audio)


android.permission.SEND_SMS

允許程序發送SMS短信(Allows an application to send SMSmessages)
  

android.permission.SUBSCRIBED_FEEDS_READ

允許一個程序訪問訂閱RSS Feed內容提供(Allows an application to allowaccess the subscribed feeds ContentProvider. )
  

android.permission.VIBRATE

允許訪問振動設備

(Allows access to the vibrator)


android.permission.WRITE_CALENDAR

允許一個程序寫入但不讀取用戶日曆數據(Allows an application to write (but not read) the user's calendardata. )


android.permission.WRITE_CONTACTS

允許程序寫入但不讀取用戶聯繫人數據(Allows an application to write (but not read) the user's contactsdata. )

android.permission.WRITE_OWNER_DATA

允許一個程序寫入但不讀取所有者數據(Allows an application to write (but not read) the owner's data.)

android.permission.WRITE_SMS

允許程序寫短信

(Allows an application to write SMS messages)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章