[geolocation-api] Background Geolocation (#131)

UVLabs has just created a new issue for https://github.com/w3c/geolocation-api:

== Background Geolocation ==
Is this still not possible yet? Am I not understanding something? I've went through a rabbit hole and bunch of stackoverflow posts with so many web developers asking for this but what seems to be the issue here?

In one of the many posts i scrubbed through it mentioned about stating usecases, there have been so manyyyy usecases mentioned and referencing this repo so my usecase is just a drop in the water.


It's simple, I'm building an order management webapp where store owners can attach orders to drivers.

When the driver starts the delivery (by clicking "start" for example), the navigator.geolocation api will start watching the position of the driver along with other logic to store that location info so that the customer will be able to see it on their end; the customer will get an SMS letting them know that the order has began, along with a special link to track the driver's location _(this would simply be some logic that queries a database at an interval to get the drivers last saved location and plot it on the map)_.

BUT as the driver is delivering the order, their phone might go in sleep mode (screen turn off), or they might get off the browser to make a call or something. During this process, the customer would not be able to know the driver's location because they're no longer on the website.

What this means is a driver who is 30 minutes away might start the delivery process, and within 10 minutes switch apps and then forget to go back to the browser, so while they're walking up to the customer's door, the customer might still think that they're 20 minutes away...

Simple right? This is something done by so many native delivery apps but in 2022 why do we still have to create a native app just for this one thing??

_What is the difference between the browser letting the driver know that it will be tracking his location in background, versus the driver installing a native app that lets him know it will be tracking his location in the background?_

They both aim to do the same thing, but why is this not possible from the web?

Please let me know if this is now possible, or if there's some other web solution I should be looking into for this functionality (background geolocation)

Please view or discuss this issue at https://github.com/w3c/geolocation-api/issues/131 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 1 October 2022 06:08:54 UTC