android - Fused Location Provider 是个不错的选择吗?

标签 android gps android-location fusedlocationproviderapi

我正在开发一个应用程序,我想在其中使用 Fused Location Provider。但我有一些疑问,还有几个问题。

  1. 当 GPS 关闭并且我将优先级设置为 HIGH 时,这是否意味着 GPS 会自动打开,还是不会?
  2. 我能否根据需要将 UpdateLocation 设置为具有高优先级的 Fused 提供程序以至少节省一点电量?
  3. 我如何知道 Fused 提供商正在使用什么(是 GPS 还是网络提供商)? 最后
  4. Fused 提供商真的是 Android 定位的最佳选择吗?有什么缺点吗?

你有什么看法? 提前致谢。

最佳答案

When GPS is off and I set priority to HIGH, does that mean that GPS will be automatically turned on, or not?

不,它不会自动打开。但是,如果您使用 SettingsApi,将向用户提示一个对话框并提供必须打开 GPS 的信息。如果用户接受,GPS 将自动激活。检查SettingsApi

How can I know what Fused provider is using (is it a GPS or a network provider)

如果您正确使用融合提供者 api 和 SettingsApi。它将为当前位置请求进行足够的必要设置。

Is Fused provider really the best choice for android location? Are there any negative points about it?

在我看来,在融合提供商之前,您必须直接与提供商打交道(GPS、网络),但融合只是问您,“您想要接收的位置有多准确?”

关于android - Fused Location Provider 是个不错的选择吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38072991/

相关文章:

ios - Mapkit 和 didUpdateToLocation - 在 iOS 上计算距离精度

java - android - 如何在服务中添加位置权限

VirtualBox : Android Connected But Not Online 上的安卓 x86

android - Eclipse 在没有时显示错误

android - 跟踪 Android 市场统计数据

android - 如何在 ImageSwitcher 中使用 Glide 加载图像

Android获取当前位置的最佳方式

geolocation - 如何使用方向角和速度计算下一次的经纬度

android - 有什么方法可以在 Android 中获得快速(5 毫秒)位置更新......?

android - Location Client 在 PendingIntent 中请求位置更新和 parcelable extras