Android Google Maps开发笔记:【2】如何配置AndroidManifest.xml文件
来源:互联网 发布:java研发工程师待遇 编辑:程序博客网 时间:2024/06/07 02:20
1.在<application>元素中加入子标签
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="your_api_key"/>
其中your_api_key置换成自己申请的API Key。
2.<manifest> 中加入一些许可信息
<permission
android:name="com.example.mapdemo.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.example.mapdemo.permission.MAPS_RECEIVE"/>
其中com.example.mapdemo换成自己的包名。
3.加入其它信息
许可设置:<uses-permission> 作为<manifest> 的子元素,需要加入下列一些:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<!-- The following two permissions are not required to use
Google Maps Android API v2, but are recommended. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
OpenGL ES V2特性支持:同样也是作为<manifest> 的子元素。
<uses-feature
android:glEsVersion="0x00020000"
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.
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="your_api_key"/>
其中your_api_key置换成自己申请的API Key。
2.<manifest> 中加入一些许可信息
<permission
android:name="com.example.mapdemo.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.example.mapdemo.permission.MAPS_RECEIVE"/>
其中com.example.mapdemo换成自己的包名。
3.加入其它信息
许可设置:<uses-permission> 作为<manifest> 的子元素,需要加入下列一些:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<!-- The following two permissions are not required to use
Google Maps Android API v2, but are recommended. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
OpenGL ES V2特性支持:同样也是作为<manifest> 的子元素。
<uses-feature
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.
0 0
- Android Google Maps开发笔记:【2】如何配置AndroidManifest.xml文件
- Android Google Maps开发笔记:【3】如何配置emulator正确运行GoogleMaps程序
- Android Google Maps开发笔记:【1】如何获取 Google Maps API key
- Android Google Maps开发笔记:【4】如何解决添加Google Maps Project无法运行
- Android开发如何利用Google Maps
- AndroidManifest.xml 文件配置学习笔记
- 【Android学习笔记2】AndroidManifest.xml文件解析
- Android:/AndroidManifest.xml文件介绍 学习笔记
- Android学习笔记之AndroidManifest.xml文件
- android学习笔记-AndroidManifest.xml 文件总结
- Android开发--AndroidManifest.xml文件解析
- AndroidManifest.xml 文件配置
- Android开发配置文件AndroidManifest.xml详解 (2)
- AndroidManifest.xml文件配置说明
- AndroidManifest.xml文件配置详解
- 笔记 AndroidManifest.xml文件详解
- Android 如何查看apk安装包的AndroidManifest.xml文件
- Android学习笔记之AndroidManifest.xml文件解析
- VS2010错误“LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏”解决办法
- Android Google Maps开发笔记:【4】如何解决添加Google Maps Project无法运行
- TortoiseSVN客户端重新设置用户名和密码
- xcopy中提示“无效的参数数量”的解决方法
- 手把手教你cuda5.5与VS2010的编译环境搭建
- Android Google Maps开发笔记:【2】如何配置AndroidManifest.xml文件
- js获取指定日期周数以及星期几的小例子
- jQuery+ajax实现鼠标单击修改内容的方法
- php防止伪造的数据从URL提交方法
- 试用cocos code IDE,并修改屏幕分辨率
- 【Android】推荐学习路线图
- 继承初始化
- AFNetworking Post请求和Soap请求简单实现
- 安装Ubuntu之后要做的几件事情