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

Can I get some clarity on foreground vs foreground extension vs background location access? I was under the impression that it was just foreground vs background.

My assumption based on the latest threads:

- **Foreground**: User has the app open on screen (the screen is on and unlocked, and the app is visible on the screen)
- **Foreground Extension**: User has the app open, but it might not be currently visible on the screen or the screen might be off/locked
- **Background**: User does not have the app open.

It's also been years since I've checked in on this; would be good to get a clear understanding of the current state of things.

My current understanding: 

Location is accessible in the **Foreground** while the app is open and the screen is unlocked. As soon as another app is on screen or the screen turns off, Location is not accessible (the **Foreground Extension** use case). If the app is not open or is closed after being opened, Location is not accessible (the **Background** use case).

---

If **Foreground Extension** is something that implementers are comfortable with, I'd say that's a step in the right direction. Use cases like trail/bike/truck route tracking would work fine with this option -- the user just needs to keep the app in the deck of "open" apps for location to be enabled. This isn't as ideal as it requires user training and wouldn't help the geofencing use case, but it's something.

FWIW, I'd be fine with this being behind a PWA install requirement. It's not that much extra lift on the user.

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


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

Received on Friday, 7 November 2025 17:41:01 UTC