How to write a background service to get latitude and longitude?

匆匆过客 提交于 2019-12-08 14:29:46

问题


I need to write a background service to get latitude and longitude values. I have an Android application in which it has to find where the user is currently. Is there any way to programmatically get the latitude and longitude values from the system services (or some program)?


回答1:


Use LocationManager. The documentation covers this.



来源:https://stackoverflow.com/questions/3640973/how-to-write-a-background-service-to-get-latitude-and-longitude

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