Android Google Maps开发笔记:【2】如何配置AndroidManifest.xml文件

1.在元素中加入子标签
    android:name="com.google.android.maps.v2.API_KEY"
   android:value="your_api_key"/>
其中your_api_key置换成自己申请的API Key。


2. 中加入一些许可信息
            android:name="com.example.mapdemo.permission.MAPS_RECEIVE"
          android:protectionLevel="signature"/>
       
  其中com.example.mapdemo换成自己的包名。


3.加入其它信息
    许可设置: 作为 的子元素,需要加入下列一些:







    OpenGL ES V2特性支持:同样也是作为 的子元素。
  android:glEsVersion="0x00020000" 

  android:required="true"/>


代码意义:
android.permission.INTERNET Used by the API to download map tiles from Google Maps servers.
android.permission.ACCESS_NETWORK_STATE Allows the API to check the connection status in order to determine whether data can be downloaded.
com.google.android.providers.gsf.permission.READ_GSERVICES Allows the API to access Google web-based services.
android.permission.WRITE_EXTERNAL_STORAGE Allows the API to cache map tile data in the device's external storage area.
The following permissions are recommended, but can be ignored if your application does not access the user's current location, either programmatically, or by enabling the My Location layer.
android.permission.ACCESS_COARSE_LOCATION Allows the API to use WiFi or mobile cell data (or both) to determine the device's location.
android.permission.ACCESS_FINE_LOCATION Allows the API to use the Global Positioning System (GPS) to determine the device's location to within a very small area.

你可能感兴趣的:(Android)