问题
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