需要Android中用户的当前位置,而不是最近的位置 [英] Need Current Location of User in Android , Not Last known location

查看:145
本文介绍了需要Android中用户的当前位置,而不是最近的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个android应用程序,我想在其中启动应用程序时向用户提供当前位置,但是当我启动我的应用程序时,它在首次启动时会提供最新的已知位置,但是我想更新用户的当前位置在应用程序启动时尽快.

I am developing an android application in which i want to get users current location when application start, But when i start my application it gives the last known location when it start first time, But i want the updated current location of the user as soon as possible on application start.

请对此进行指导. 谢谢

Please guide me about this. Thanks

推荐答案

使用 LocationServices .它包含此处

这篇关于需要Android中用户的当前位置,而不是最近的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆