我正在开发一个应用程序,我想在其中使用 Fused Location Provider。但我有一些疑问,还有几个问题。
- 当 GPS 关闭并且我将优先级设置为 HIGH 时,这是否意味着 GPS 会自动打开,还是不会?
- 我能否根据需要将 UpdateLocation 设置为具有高优先级的 Fused 提供程序以至少节省一点电量?
- 我如何知道 Fused 提供商正在使用什么(是 GPS 还是网络提供商)? 最后
- 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/