android配置网络权限管理,Android 网络权限配置
下面給大家介紹的是在開(kāi)發(fā)安卓應(yīng)用程序時(shí),怎么去對(duì)網(wǎng)絡(luò)權(quán)限進(jìn)行配置,相信很多開(kāi)發(fā)者會(huì)感興趣的。
Android開(kāi)發(fā)應(yīng)用程序時(shí),如果應(yīng)用程序需要訪(fǎng)問(wèn)網(wǎng)絡(luò)權(quán)限,需要在 AndroidManifest.xml 中加入以下代碼android:name=”android.permission.INTERNET”>
如果不知道放在哪個(gè)位置,那就放在前邊好了。
同樣的如果用到其它的權(quán)限,也需要作出聲明,部分權(quán)限列表如下:
android.permission.ACCESS_CHECKIN_PROPERTIES
允許讀寫(xiě)訪(fǎng)問(wèn)”properties”表在 checkin數(shù)據(jù)庫(kù)中,改值可以修改上傳( Allows read/write access to the “properties” table in the checkin database, to change values that get uploaded)
android.permission.ACCESS_COARSE_LOCATION
允許一個(gè)程序訪(fǎng)問(wèn)CellID或WiFi熱點(diǎn)來(lái)獲取粗略的位置(Allows an application to access coarse (e.g., Cell-ID, WiFi) location)
android.permission.ACCESS_FINE_LOCATION
允許一個(gè)程序訪(fǎng)問(wèn)精良位置(如GPS) (Allows an application to access fine (e.g., GPS) location)
android.permission.ACCESS_LOCATION_EXTRA_COMMANDS
允許應(yīng)用程序訪(fǎng)問(wèn)額外的位置提供命令(Allows an application to access extra location provider commands)
android.permission.ACCESS_MOCK_LOCATION
允許程序創(chuàng)建模擬位置提供用于測(cè)試(Allows an application to create mock location providers for testing)
android.permission.ACCESS_NETWORK_STATE
允許程序訪(fǎng)問(wèn)有關(guān)GSM網(wǎng)絡(luò)信息(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
允許程序訪(fǎng)問(wèn)Wi-Fi網(wǎng)絡(luò)狀態(tài)信息(Allows applications to access information about Wi-Fi networks)
android.permission.ADD_SYSTEM_SERVICE
允許程序發(fā)布系統(tǒng)級(jí)服務(wù)(Allows an application to publish system-level services).
android.permission.BATTERY_STATS
允許程序更新手機(jī)電池統(tǒng)計(jì)信息(Allows an application to update the collected battery statistics)
android.permission.BLUETOOTH
允許程序連接到已配對(duì)的藍(lán)牙設(shè)備(Allows applications to connect to paired bluetooth devices)
總結(jié)
以上是生活随笔為你收集整理的android配置网络权限管理,Android 网络权限配置的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: http client 短链接复用(变为
- 下一篇: Android权限管理