Geolocation.watchPosition() doesn't work in background on Android O and above
Categories
(Core :: DOM: Geolocation, defect, P2)
Tracking
()
Webcompat Priority | P3 |
People
(Reporter: matt.panaro, Unassigned)
References
Details
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
Comment 4•6 years ago
|
||
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
Comment 7•6 years ago
|
||
Comment 8•6 years ago
|
||
Comment 9•6 years ago
|
||
Comment 11•4 years ago
|
||
I'd like to make the following suggestion for how this could be implemented from a UX perspective:
(i) If a webpage, or at least a PWA, is sent to the background while watchPosition() is already running, the position will continue being watched.
(ii) If this happens, a notification will appear while any background webpage or PWA is watching the user's location.
(iii) Once the location watch has been dropped and the notification vanished, the app must be put back in the foreground before it can resume access.
(iv) The domain or PWA-name will be listed in the notification, and the access can easily and quickly be stopped or revoked from the notification.
This is not only how (essentially) all mobile browsers currently handle webpages playing audio in the background, but also how existing navigation apps such as Google Maps and Waze handle background location access, so there's a tremendous precedent for this; I also believe it genuinely cuts an extremely good balance between usability/battery/alert-fatigue/etc, and potential privacy concerns.
It would, I believe, not violate the principle of least-surprise at all, and I suspect it would, further, set a precedent for how to keep the user informed of background location access that I will prove sorely needed as the W3C prepares to publish its recommendations concerning the more-"passive" background-geofencing.
Comment 12•4 years ago
|
||
My web app for recording my GPS positions, which I have used for years, has become useless due to this bug now that I switched to Android 10, even if I "install" it to the home screen via Fenix Nightly.
Are there any plans to work on this for future Fenix versions?
I would love if I do not have to resort to native apps to record GPS tracks (where this works without issues), esp. as I have put a lot of work into making this web app work over the years.
Updated•3 years ago
|
Comment 13•3 years ago
|
||
This might be a duplicate https://webcompat.com/issues/81320
Updated•2 years ago
|
Description
•