zoukankan      html  css  js  c++  java
  • 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)

  • 相关阅读:
    python模块学习第 0000 题
    报错The VMware Authorization Service is not running
    图像指纹的重复识别
    CSS预编译器配置-------LESS Sass Stylus webstorm
    CSS布局中的水平垂直居中
    进度与日程
    HTML5 application cache
    进度
    CC2530芯片介绍
    Linux命令工具 top详解
  • 原文地址:https://www.cnblogs.com/riskyer/p/3285578.html
Copyright © 2011-2022 走看看