Android 存取權限設定

來源:互聯網
上載者:User

Android開發應用程式時,有時我們要用到很多許可權, 今天我就收集了一些開發時可能用到的開啟使用權限設定。

這些許可權都是在 AndroidManifest.xml設定。

設定方法


以下是各種參數:

1.訪問網路許可權(這個常用吧)


 2.許讀寫訪問 "properties"表在checkin資料庫中,改值可以修改上傳( Allows read/write access to the "properties" table inthe checkin database, to change values that get uploaded)

android.permission.ACCESS_CHECKIN_PROPERTIES

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

android.permission.ACCESS_COARSE_LOCATION 

4.允許一個程式訪問精良位置(如GPS) (Allows an application to access fine(e.g., GPS) location)

android.permission.ACCESS_FINE_LOCATION

5.允許應用程式訪問額外的位置提供命令(Allows an application to access extra location provider commands)

android.permission.ACCESS_LOCATION_EXTRA_COMMANDS 

6.允許程式建立類比位置提供用於測試(Allows an application to create mock location providers fortesting)

android.permission.ACCESS_MOCK_LOCATION

7.允許程式訪問有關GSM網路資訊(Allows applications to accessinformation about networks)

android.permission.ACCESS_NETWORK_STATE

8.允許程式使用SurfaceFlinger底層特性(Allows an application touse SurfaceFlinger's low level features)

android.permission.ACCESS_SURFACE_FLINGER

9.允許程式訪問Wi-Fi網路狀態資訊(Allows applications to accessinformation about Wi-Fi networks)

android.permission.ACCESS_WIFI_STATE

 10.允許程式發布系統級服務(Allows an application to publish system-level services).

android.permission.ADD_SYSTEM_SERVICE

11.允許程式更新手機電池統計資訊(Allows an application to update the collected battery statistics)

android.permission.BATTERY_STATS

  12.允許程式串連到已配對的藍牙裝置(Allows applications to connect to paired bluetooth devices)

android.permission.BLUETOOTH

  13.允許程式發現和配對藍牙裝置(Allows applications to discover and pair bluetooth devices)

 android.permission.BLUETOOTH_ADMIN

  14.請求能夠禁用裝置(非常危險)(Required to be able to disable the device (very dangerous!).)

android.permission.BRICK 

  15.許程式廣播一個提示訊息在一個應用程式套件組合已經移除後(Allows an application to broadcast a notification that anapplication package has been removed)

android.permission.BROADCAST_PACKAGE_REMOVED

16. .允許一個程式廣播常用intents(Allows an application to broadcast sticky intents)

 android.permission.BROADCAST_STICKY 

  17.允許一個程式初始化一個電話撥號不需通過撥號使用者介面需要使用者確認(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_PHONE

18.允許一個程式撥打任何號碼,包含緊急號碼無需通過撥號使用者介面需要使用者確認(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.CALL_PRIVILEGED

19.請求訪問使用照相裝置(Required to be able to access the camera device. )

android.permission.CAMERA 

  20.允許一個程式是否改變一個組件或其他的啟用或禁用(Allows an application to change whether an application component(other than its own) is enabled or not. )

android.permission.CHANGE_COMPONENT_ENABLED_STATE 

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

android.permission.CHANGE_CONFIGURATION 

22.允許程式改變網路連接狀態(Allows applications to change network connectivity state)

 android.permission.CHANGE_NETWORK_STATE 

  23. 允許程式改變Wi-Fi串連狀態(Allows applications to changeWi-Fi connectivity state)

android.permission.CHANGE_WIFI_STATE 

  24.允許一個程式清楚緩衝從所有安裝的程式在裝置中(Allows an application to clear the caches of all installedapplications on the device. )

 android.permission.CLEAR_APP_CACHE 

  25.允許一個程式清除使用者佈建(Allows an application to clear user data)

android.permission.CLEAR_APP_USER_DATA

  26.允許啟用禁止位置更新提示從無線模組(Allows enabling/disabling location update notifications from theradio. )

android.permission.CONTROL_LOCATION_UPDATES 

  27.允許程式刪除快取檔案(Allows an application to delete cache files)

 android.permission.DELETE_CACHE_FILES 

  28.允許一個程式刪除包(Allows an application to delete packages)

android.permission.DELETE_PACKAGES

  29.允許訪問底層電源管理(Allows low-level access to power management)

android.permission.DEVICE_POWER

  30.允許程式RW診斷資源(Allows applications to RW todiagnostic resources. )

android.permission.DIAGNOSTIC 

  31.允許程式禁用鍵盤鎖(Allows applications to disable the keyguard )

 android.permission.DISABLE_KEYGUARD 

32.允許程式返回狀態抓取資訊從系統服務(Allows an application to retrieve state dump information fromsystem services.)

android.permission.DUMP

33. 允許一個程式擴充收縮在狀態列,Android開發網提示應該是一個類似Windows Mobile中的托盤程式(Allows an application to expand or collapse the status bar. )

android.permission.EXPAND_STATUS_BAR 

34.作為一個工廠測試程式,運行在root使用者(Run as a manufacturer testapplication, running as the root user. )

android.permission.FACTORY_TEST 

35.訪問閃光燈,HTC Dream不包含閃光燈(Allows access to the flashlight )

android.permission.FLASHLIGHT

36.允許程式強行一個後退操作是否在頂層activities(Allows an application to force a BACK operation onwhatever is the top activity. )

 android.permission.FORCE_BACK 

37.允許一個程式擷取任何package佔用空間容量(Allows an application to findout the space used by any package. )

android.permission.GET_PACKAGE_SIZE

38.允許一個程式擷取資訊有關當前或最近啟動並執行任務,一個縮減的任務狀態,是否活動等等

 android.permission.GET_TASKS

39. 允許訪問硬體

android.permission.HARDWARE_TEST 

40.


允許一個程式安裝packages

 android.permission.INSTALL_PACKAGES

42.


43.允許程式開啟網路通訊端

android.permission.INTERNET 

 44.允許程式管理(建立、催後、z -order預設向z軸推移)程式引用在視窗管理器中

android.permission.MANAGE_APP_TOKENS

45.允許程式修改全域音頻設定

android.permission.MODIFY_AUDIO_SETTINGS 

46.允許修改話機狀態,如電源,人機介面等

 android.permission.MODIFY_PHONE_STATE

47.允許掛載和反掛載檔案系統抽取式存放裝置

android.permission.MOUNT_UNMOUNT_FILESYSTEMS

48.允許一個程式設定他的activities顯示

android.permission.PERSISTENT_ACTIVITY 

49.允許程式監視、修改有關播出電話

android.permission.PROCESS_OUTGOING_CALLS 

50.允許程式讀取使用者行事曆資料

 android.permission.READ_CALENDAR

  51.允許程式讀取使用者連絡人資料

android.permission.READ_CONTACTS 

 52.允許底層訪問設定螢幕方向和實際旋轉

android.permission.SET_ORIENTATION

53.允許程式設定壁紙hits

android.permission.SET_WALLPAPER_HINTS 

54.允許程式設定壁紙

android.permission.SET_WALLPAPER

55.允許程式設定時間地區

android.permission.SET_TIME_ZONE 

56.允許一個程式寫入但不讀取所有者資料

android.permission.WRITE_OWNER_DATA

57. 允許程式讀取或寫入系統設定

android.permission.WRITE_SETTINGS 

58.允許一個程式寫入但不讀取使用者行事曆資料

android.permission.WRITE_CALENDAR

59.允許程式寫簡訊

 android.permission.WRITE_SMS

歡迎大家補充,謝謝了!

 

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.