android get location from best provider available

天涯浪子 提交于 2019-11-28 06:59:35

Maybe you can try listening to both the network provider and gps provider for a certain amount of time and then check the results from the two. If you don't have results from the gps, use the network results instead. That's how I did it.

Filippo Mazza

Maybe you can use getBestProvider (Criteria criteria, boolean enabledOnly) of LocationManager with criteria as in this other thread. See the official documentation.

Hope it helps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!