问题描述
我正在开发一个要使用融合位置提供程序的应用程序.但是我有一些疑问,还有几个问题.
I am developing an application where I want to use Fused Location Provider. But I have some doubts, and couple of questions.
- 当GPS关闭并且我将优先级设置为高"时,这是否意味着GPS将自动打开?
- 是否可以按需将具有高优先级的Fused提供程序设置为UpdateLocation,以节省至少一点电量?
- 我怎么知道正在使用什么融合服务提供商(它是GPS还是网络提供商)?最后
- Fused提供者真的是Android位置的最佳选择吗?是否有任何消极之处?
- When GPS is off and I set priority to HIGH, does that mean that the GPS will be automatically turned on, or not?
- Can I set UpdateLocation with Fused provider with HIGH priority on demand to save battery at least a little bit?
- How can I know what Fused provider is using (is it a GPS or a network provider)?And finally
- Is Fused provider really the best choice for android location? Are there any negative points about it?
您对此有何看法?预先感谢.
What is your opinion?Thanks in advance.
推荐答案
否,它不会自动打开.但是,如果您使用SettingsApi,则会向用户提示对话框,并提供必须打开GPS的信息.如果用户接受,则GPS将自动激活.检查 SettingsApi
No, it will not be turned on automatically. But if you use SettingsApi, will prompt a dialog to user and gives information that GPS is must be turned on. If user accepts it, the gps will be active automatically. Check the SettingsApi
如果您正确地将融合的提供程序api与SettingsApi一起使用.它将为当前位置请求进行足够的必要设置.
If you use fused provider api with SettingsApi properly. It will make adequate the required settings for current location request.
我认为,在融合提供者之前,您必须直接与提供者(Gps,网络)打交道,但是融合只是问您:您想获得多少准确的位置?"
In my opinion, before fused provider you must deal with directly providers(Gps, network) But fused just asks you, "how accurate locations you wanna receive ?"
这篇关于Fused Location Provider是很好的选择吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!