Android开发应用程序时,如果应用程序需要访问网络权限,需要在 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)