w3c / geolocation-sensor

Geolocation Sensor
https://www.w3.org/TR/geolocation-sensor/
Other
59 stars 21 forks source link

Background geolocation and user privacy issues #39

Open FluorescentHallucinogen opened 5 years ago

FluorescentHallucinogen commented 5 years ago

One of the problems with background geolocation is that the user gives access to it once, and then the app can use it (in service worker) if it's minimized or even closed (see the use cases), and the user may not know about it. This is a user privacy issue. Therefore, some kind of visual indicator is needed.

Native Android apps shows an icon in the status bar (when geolocation is accessed):

status-bar-geolocation

But this approach has a few drawbacks:

That's why I propose persistent notification:

persistent-notification-geolocation

This approach is already used for accessing audio and video input:

persistent-notification-audio-video

tomayac commented 5 years ago

Thanks for filing this issue. It's well on our mind, yet no spec text has landed yet.

One idea we're exploring in parallel is whether Wake Locks can be used to make background geolocation happen, please see the related issue over in the Wake Lock repo.

Coincidentally, I've written an article where in the Closing Thoughts paragraph I bring up exactly the point you bring up.

FluorescentHallucinogen commented 5 years ago

Another idea that came to my mind is to revoke permissions if the user didn't run the app for a long time. Generally speaking, this approach can be applied not only to geolocation, but to any permissions. This can be used as additional protection e.g. if the user has forgotten that once grant the permission.

tomayac commented 5 years ago

Another idea that came to my mind is to revoke permissions if the user didn't run the app for a long time. Generally speaking, this approach can be applied not only to geolocation, but to any permissions. This can be used as additional protection e.g. if the user has forgotten that once grant the permission.

Fully agree this is an issue, and also fully agree it is a bigger question not just limited to the context of this spec. It seems the generic issue where questions like this are discussed is now https://github.com/w3c/permissions/issues/124.

FluorescentHallucinogen commented 5 years ago

On the other hand, if the user has already installed the web app (WebAPK, TWA), then it could grant some permissions by default even without a prompt, since it's already in some sense trusted (e.g. accessing motion sensors for VR/AR apps).

tomayac commented 5 years ago

All great points. From the W3C Permission Workshop report:

These points deserve thorough discussion (much of which has happened already), but over in the Permissions repo :-)

Let's keep this Issue focused on background geolocation indication.

hadriann commented 4 years ago

Any updates on this?

In the meantime, the System Wake Lock API was dropped and we ended up with a Screen Wake Lock API that's pretty useless in this regard.

IMO this is a non-issue and I think things got a little mixed up here. The background geotracking should be no different in web apps than in native apps. No special treatment is required. Operating systems are already showing some sort of status notification when the GPS is in use, regardless what app uses it. The type of notification (be it icon, text, persistent or otherwise) is of no concern for this spec. At most, an issue (or feature request) can be raised with a specific OS if someone feels the need for changing the system notification.

I would suggest not trying to solve all platform-related issues with this spec, but rather focus on getting the background geolocation on par with the native apps, as imperfect as that may be.