Android: get current coordinates in real time using google map

I tried a few guides, but no luck getting the current coordinates, maybe I canโ€™t follow, or really donโ€™t know how to set it up.

Sorry for the newbie. I just want to create an application that will get the current location via gps, whether the location will change or not. I can get the last known location, but I canโ€™t implement to get the coordinates in real time. It will be very helpful to have a whole source that will show the solution. I am easily lost in part on the part of the code.

Thanks in advance.

+5
source share
1 answer

Both links provide useful code.

For the LocationManager, go to this link: http://gabesechansoftware.com/location-tracking/ ( Gabe Sechan )

For FusedLocationProviderApi follow this link: fooobar.com/questions/295183 / ... ( Daniel Nugent )

+3
source

Source: https://habr.com/ru/post/1241452/


All Articles