简体   繁体   中英

Tracking the location in android

I got the current location latitude and longitude while giving on in a switch button in android and displaying the location in google map. But I need the latitude and longitude changes automatically wherever the device moves and the location on the map should change with respect to the position. How is it possible? Can anyone give me a way?

You could have a look at GoogleApiClient . You can use requestLocationUpdates(...) to get the users position in a given intervall.
You can find more Info here

But honestly you could have find the answer on your own if you googled a bit.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM