Android location permissions(Android 位置权限)
问题描述
在我的 Android 应用程序中,我愿意使用 GPS 位置.
In my Android application I'm willing to use GPS locations.
- 我应该在 android 中包含哪些主要的权限manifest 文件,以便使用 GPS 位置.
- 如果失去 GPS 信号强度,有没有办法使用移动网络三角测量位置.
- What are the main permissions that I should included in android manifest file in order to use GPS locations.
- In case of lost the GPS signal strength, is there any way to triangulate the position using mobile networks.
谢谢!
推荐答案
你需要的主要权限是android.permission.ACCESS_COARSE_LOCATION或android.permission.ACCESS_FINE_LOCATION.
The main permissions you need are android.permission.ACCESS_COARSE_LOCATION or android.permission.ACCESS_FINE_LOCATION.
只有精细的位置才能让您访问 gps 数据,并允许您访问粗略位置提供的所有其他内容.您可以使用 LocationManager 的方法从 gps 和已经有信号塔来源,您不必自己计算这些信息.
Only fine location will allow you access to gps data, and allows you access to everything else coarse location gives. You can use the methods of the LocationManager to acquire location data from gps and cell tower sources already, you do not have to work out this information yourself.
如果您的目标是 API 级别 21 (5.0) 或更高,您可能还需要这个:
If you are targeting API Level 21 (5.0) or higher, you may also need this:
<uses-feature android:name="android.hardware.location.gps" />
这篇关于Android 位置权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Android 位置权限
基础教程推荐
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
