① android怎麼在androidmanifest.xml文件中注冊許可權
android在androidmanifest.xml文件中注冊許可權的方法如下
1、程序執行需要讀取到安全敏感項必需在androidmanifest.xml中聲明相關許可權請求, 完整列表如下:
android.permission.ACCESS_CHECKIN_PROPERTIES
允許讀寫訪問」properties」表在checkin資料庫中,改值可以修改上傳( Allows read/write access to the 「properties」 table in the checkin database, to change values that get uploaded)
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_LOCATION_EXTRA_COMMANDS
允許應用程序訪問額外的位置提供命令(Allows an application to access extra location provider commands)
android.permission.ACCESS_MOCK_LOCATION
允許程序中友創建模擬位置提供用於測試(Allows an application to create mock location providers for testing)
android.permission.ACCESS_NETWORK_STATE
允許程序訪問有關GSM網路信息(Allows applications to access information about networks)
android.permission.ACCESS_SURFACE_FLINGER
允許程序使用SurfaceFlinger底層特性(Allows an application to use SurfaceFlinger』s low level features)
android.permission.ACCESS_WIFI_STATE
允許程序訪問Wi-Fi網路狀態信息(Allows applications to access information about Wi-Fi networks)
android.permission.ADD_SYSTEM_SERVICE
允許程序發布系統級服務(Allows an application to publish system-level services).
android.permission.BATTERY_STATS
允許程序更新手機電池統計信息(Allows an application to update the collected battery statistics)
android.permission.BLUETOOTH
允許程序連接到已配對的藍牙設備賣配槐(Allows applications to connect to paired bluetooth devices)
android.permission.BLUETOOTH_ADMIN
允許程序發現和配對賣判藍牙設備(Allows applications to discover and pair bluetooth devices)
android.permission.BRICK
請求能夠禁用設備(非常危險)(Required to be able to disable the device (very *erous!).)
android.permission.BROADCAST_PACKAGE_REMOVED
允許程序廣播一個提示消息在一個應用程序包已經移除後(Allows an application to broadcast a notification that an application 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 going through the Dialer user interface for the user to confirm the call being placed.)
android.permission.CALL_PRIVILEGED
允許一個程序撥打任何號碼,包含緊急號碼無需通過撥號用戶界面需要用戶確認(Allows an application to call any phone number, including emergency numbers, without going through the Dialer user interface for the user to confirm the call being placed)
android.permission.CAMERA
請求訪問使用照相設備(Required to be able to access the camera device. )
android.permission.CHANGE_COMPONENT_ENABLED_STATE
允許一個程序是否改變一個組件或其他的啟用或禁用(Allows an application to change whether an application component (other than its own) is enabled or not. )
android.permission.CHANGE_CONFIGURATION
允許一個程序修改當前設置,如本地化(Allows an application to modify the current configuration, such as locale. )
android.permission.CHANGE_NETWORK_STATE
允許程序改變網路連接狀態(Allows applications to change network connectivity state)
android.permission.CHANGE_WIFI_STATE
允許程序改變Wi-Fi連接狀態(Allows applications to change Wi-Fi connectivity state)
android.permission.REORDER_TASKS
允許程序改變Z軸排列任務(Allows an application to change the Z-order of tasks)
android.permission.RESTART_PACKAGES
允許程序重新啟動其他程序(Allows an application to restart other applications)
android.permission.SEND_SMS
允許程序發送SMS簡訊(Allows an application to send SMS messages)
android.permission.SET_ACTIVITY_WATCHER
允許程序監控或控制activities已經啟動全局系統中Allows an application to watch and control how activities are started globally in the system.
android.permission.SET_ALWAYS_FINISH
允許程序控制是否活動間接完成在處於後台時Allows an application to control whether activities are immediately finished when put in the background.
android.permission.SET_ANIMATION_SCALE
修改全局信息比例(Modify the global animation scaling factor.)
android.permission.SET_DEBUG_APP
配置一個程序用於調試(Configure an application for debugging.)
android.permission.SET_ORIENTATION
允許底層訪問設置屏幕方向和實際旋轉(Allows low-level access to setting the orientation (actually rotation) of the screen.)
android.permission.SET_PREFERRED_APPLICATIONS
允許一個程序修改列表參數PackageManager.addPackageToPreferred() 和PackageManager.removePackageFromPreferred()方法(Allows an application to modify the list of preferred applications with the PackageManager.addPackageToPreferred() and PackageManager.removePackageFromPreferred() methods.)
android.permission.SET_PROCESS_FOREGROUND
允許程序當前運行程序強行到前台(Allows an application to force any currently running process to be in the foreground.)
android.permission.SET_PROCESS_LIMIT
允許設置最大的運行進程數量(Allows an application to set the maximum number of (not needed) application processes that can be running. )
android.permission.SET_TIME_ZONE
允許程序設置時間區域(Allows applications to set the system time zone)
android.permission.SET_WALLPAPER
允許程序設置壁紙(Allows applications to set the wallpaper )
android.permission.SET_WALLPAPER_HINTS
允許程序設置壁紙hits(Allows applications to set the wallpaper hints)
android.permission.WRITE_SETTINGS
允許程序讀取或寫入系統設置(Allows an application to read or write the system settings. )
android.permission.WRITE_SMS
允許程序寫簡訊(Allows an application to write SMS messages)
android.permission.WRITE_SYNC_SETTINGS
允許程序寫入同步設置(Allows applications to write the sync settings)
2、android平台上的許可權許可分得很細,如果軟體無法正常執行時看看是不是缺少相關的permission聲明,最終還需要使用 android sign tools簽名生成的apk文件。