LocationManager 动态更改提供商
如果设备丢失 GPS 信号,LocationManager 是否有能力进行更改,例如从 GPS 更改为更多课程提供者?
据我所知不是,但我不是 100% 确定,所以我需要问
(我问的原因是我很想制作自己的 LocationManagerManager 来处理这类问题。我可能让它接受多个 Criteria 对象在传统的 LocationManager 不够灵活的各种情况下按某种顺序进行尝试,但我不想重新发明轮子,例如,如果 Google 在某些未知的方法/类中处理了这个问题。 我)。
谢谢
Does LocationManager have the ability to change, from example, from GPS to a more course provider, should the device lose its GPS signal?
As far as I know it's not, but I'm not 100% sure, so I need to ask
(The reason I ask, is I'm tempted to make my own LocationManagerManager that handles these sorts of problems. I might have it accept multiple Criteria objects which are tried in some sort of order under various circumstances that the traditional LocationManager isn't flexible enough for. But I don't want to be reinventing the wheel, e.g. if Google have handled this in some method/class unknown to me).
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知,您的选择可能是最好的主意。注册所有可用的提供商,然后返回最佳的可用位置值。
Not that I'm aware of: your option is probably the best idea. Register for all the available providers and then return the best available Location value.
是的,它已经可用了。只要谷歌一下,你一定能得到它。检查一下这个功能:
`
`
Yeah, it's already available. Just google it, u must get it. Check this function out :
`
`