Android 網路許可權配置
Android開發應用程式時,如果應用程式需要訪問網路許可權,需要在 AndroidManifest.xml 中加入以下程式碼
<uses-permission android:name=”android.permission.INTERNET”></uses-permission>
如果不知道放在哪個位置,那就放在</manifest>前邊好了。
同樣的如果用到其它的許可權,也需要作出宣告,部分許可權列表如下:
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)