Answer the question
In order to leave comments, you need to log in
Android Studio Google Maps: how to use mMap.getMyLocation() geolocation?
Hello!
private void setUpMap(GoogleMap map) {
mMap = map;
mMap.setMyLocationEnabled(true);
Location myLocation = mMap.getMyLocation();
}
Answer the question
In order to leave comments, you need to log in
It doesn't work otherwise. You can of course set a predetermined interval, but it has little effect on the operation of the GPS itself. Because even a hot start can take up to a minute. And if the coordinates are needed here and now, even with an interval of 15 seconds, you will have to keep it constantly on.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question