Need Current Location of User in Android , Not Last known location

孤街浪徒 提交于 2019-12-11 08:24:48

问题


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


回答1:


Use LocationServices. It containes all location strategies described here




回答2:


Is not there any way to get current location when application start 1st time OR application not proceed for any next activity until application get current location update, not last known location.



来源:https://stackoverflow.com/questions/22441789/need-current-location-of-user-in-android-not-last-known-location

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