安卓开发之常用权限总结
做安卓开发会设计到很多系统权限,在此做个总结,以后会不断更新,都是从网上抄来的,未验证。
-------------------------------------邪恶的分割线-----------------------------------
添加WiFi以及访问网络的权限:
<uses-permissionandroid:name="android.permission.CHANGE_NETWORK_STATE"></uses-permission>
<uses-permissionandroid:name="android.permission.CHANGE_WIFI_STATE"></uses-permission>
<uses-permissionandroid:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<uses-permissionandroid:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permissionandroid:name="android.permission.INTERNET"></uses-permission>
<uses-permissionandroid:name="android.permission.WAKE_LOCK"></uses-permission>
操作外部存储设备文件:
<uses-permissionandroid:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
录音时需要的权限:
<uses-permissionandroid:name="android.permission.RECORD_AUDIO"></uses-permission>
<uses-permissionandroid:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
录制视频时需要的权限:
<uses-permissionandroid:name="android.permission.CAMERA"></uses-permission>
<uses-permissionandroid:name="android.permission.RECORD_AUDIO"></uses-permission>
<uses-permissionandroid:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
发送短信:
<uses-permissionandroid:name="android.permission.SEND_SMS"></uses-permission>
收短信:
<uses-permissionandroid:name="android.permission.RECEIVE_SMS"/>
收彩信:
<uses-permissionandroid:name="android.permission.READ_SMS"/>
GPS:
<!--權限:上網連線-->
<uses-permissionandroid:name="android.permission.INTERNET"></uses-permission>
<!--權限:GPS定位-->
<uses-permissionandroid:name="android.permission.ACCESS_MOCK_LOCATION"></uses-permission>
<uses-permissionandroid:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"></uses-permission>
<uses-permissionandroid:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
<!--權限:AGPS定位-->
<uses-permissionandroid:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>