Start sending location to server when app closed

Hello there

I am trying to find out some good ideas for the developer team I am working with (actually I am not developer).
We need to find a solution to ease the use of our app for our partners.

Our app is a basic hailing app for drivers. But because they have multiple things to think of we d like to make the app active without asking them to actually start the app once they are registered.

To be active our dirver must send their location to a sever every X min max. Because there is also a maximum distance to receive a hail, we also need to update the location when it change by more than 200meters.

Reading lot of forums and documentations I don t know what would be the best idea to perform such a behavior.

What do you think of :
Start background service (app closed) with activityrecognition API (when in car for example) or with a location change of more than 200m (if possible)
Then use location listener with change above 200m or 1.30 minutes
Set a clock to stop sending location If no change after one hour
And then relaunch the service and locatin update when detect incar (or change location)

If must show foreground service notif each time the location is sent ok

I really hope this is understandable
Many thanks for the help

Sign In or Register to comment.