This tutorial explains how to get location updates continuously/repeatedly, in the background, even while not using the application.
FusedLocationProviderClient have been used to get the location updates.
Also, different types of permissions required for and application to get the device location have been explained.
Note: Watch the complete video to understand the scenario and use case which this app is covering.
Must read this article:
https://trickyworld.tech/location-updates/
Kotlin project:
https://github.com/ibrahimgiki/LocationNew
Java project:
https://github.com/ibrahimgiki/location-updates-java
apk: https://drive.google.com/file/d/1keeSF-23kDuSBNpe4BQCgFw7WGdPYDal/view?usp=sharing