Re: [geolocation-sensor] Support geolocation (especially geofencing) in the "background" (#22)

Adding one more recent use case, since I see the Devices & Sensors WG is discussing this topic tomorrow at TPAC 2025.

I work on a team that creates web-based tools for a professional sports organization. As part of the org.'s anti-doping (drug testing) program, all athletes are subject to drug testing at any time and must log their locations/times in a calendar interface that they are required to keep current. If an athlete is selected for testing, a collector is dispatched to their specified calendar location to conduct a test. But what happens is athletes are often not where they said they'd be – plans change and life gets hectic and it's easy for many to forget to update their whereabouts calendars. Missed tests cost the organization a ton of money and time, while athletes can be disciplined if they're believed to have attempted to avoid a drug test.

So we keep getting a feature request to allow athletes to opt to sharing their location instead of constantly updating a calendar. Collection officers could then simply look at an athlete's current geolocation and go right to them without worrying if they'll be there or not. Athletes who opt in could go about their lives without having to constantly update a whereabouts calendar. 

Currently, this feature isn't possible. But if background geolocation was a possibility then it could be. The way we are envisioning it, an athlete can opt-in to background geolocation for a certain amount of time (end of day, 30 days, permanently, etc.), which would solve a lot of headaches on both sides.

I don't know how to implement background geolocation in a way that is fair while avoiding bad actors from abusing the feature – available in all browser tabs, only when installed as a PWA, etc. But I do believe that there are practical use cases where it is wanted and can provide value to users.

-- 
GitHub Notification of comment by dsenneff
Please view or discuss this issue at https://github.com/w3c/geolocation-sensor/issues/22#issuecomment-3524041431 using your GitHub account


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

Received on Wednesday, 12 November 2025 21:40:53 UTC