I need a background service which runs continuously for my app. I looked online for different ways like foreground service which continuously shows notification for versions above android 8, Work Manager and Job Scheduler. I think Work Manager suits my requirements in terms of background running but not sure whether it can be triggered based on the location distance change.
https://developer.android.com/topic/libraries/architecture/workmanager
I see that we can have periodic updates like every 15 min but wanted to know if we can configure based on location distance change itself.
https://medium.com/@prithvibhola08/location-all-the-time-with-workmanager-8f8b58ae4bbc
Example if I set setSmallestDisplacement(10m)
for location request, the worker manager should be triggered every 10m distance change and send location to server.
https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest