Re: [w3c/ServiceWorker] postMessage keeps service workers alive indefinitely (#980)

> using firebase pings to wake service worker seems impractical

Yeah, you have to show a notification as the result of a push. Again, we want this background work to be user-visible.

> need to use navigation apps and put our app in background

It feels like https://w3c.github.io/wake-lock/ is what you're looking for. You want a CPU lock on the tab, maybe a screen lock too (if you're showing position on maps).

> can we achieve all of the above with shared workers? without the service worker stopping and when the app loses focus?

Unfortunately not. Shared workers will be killed once their parent page is killed.

> 'Tracking the user in the background is highly likely to be a case of a site acting poorly'. According to who?

You don't have to search too hard to find angry articles like this https://www.theverge.com/2016/11/30/13763714/uber-location-data-tracking-app-privacy-ios-android. People generally don't like being spied on.

You may also be interested in https://techcrunch.com/2014/04/04/the-right-way-to-ask-users-for-ios-permissions/, which goes into some detail on permissions. It's difficult getting the balance right. You want powerful features, but you want to make sure the user is aware (continually if necessary) they're being used.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/980#issuecomment-310431235

Received on Thursday, 22 June 2017 16:24:28 UTC