Natively have this as an option for their wrapping service. Basically you trigger it from the frontend sending in an identifier (drivers UID for example) and then have a webhook setup to receive location data with the identifier (so then you would do a search for driver(UID = Request Datas ID)first item’s location = request data’s lat/long…etc).
When it is triggered you can set the intervals for how often the webhook gets pinged i.e every 30 seconds or 30 minutes. You can start/stop this as required so you could increase the ping rate when a job is active and decrease it when the driver is idle for example.
It works in the background insomuch as if the app is sitting in the background it will still receive data, but if the app is closed completely then it will stop receiving updates. This meaning that when the app is opened again you would need to retrigger capture of location data. There’s a few ways to approach doing that.
1 Like