I want to get a user's location on a map, but I want this to update continuously for a map. The tutorials that I've found usually show how to fetch the user's coordinates once. Ideally, I'd get their location every ten seconds.
How would I accomplish this?
you can use
Location Request
andfused location Api
to update and fetch user location in a selected interval:this is the Main activity:
And the manifest.xml file:
the project will:
Retreive user location at a specified interval using fused location api.
Ask specific runtime permission for location update
Draw a marker on google map based on user real time location..update
for details you can see this link:https://www.androidtutorialpoint.com/intermediate/android-map-app-showing-current-location-android/