Is it possible to track geolocation with a service worker while PWA is not open

Blue Space picture Blue Space · Jan 16, 2019 · Viewed 8.2k times · Source

Is it possible to read from local storage and track geolocation in PWAs with a service worker while app is not open on phone (in background)

So far my research is pointing to no, and I am finding that the PWA needs to be open for location services.

Thank you,

Answer

McMurphy picture McMurphy · Jan 16, 2019

The solution is at hand and has been for some years now as this POC clearly testifies. Unfortunately W3C and lobbyists such as Jake Archibald have fought tooth and nail to prevent it from being made available :-(

Why? I know not. The "cui bono" argument points to plug-in vendors such as Ionic whose whole raison d'etre appears to be background geolocation.

See this link for complete story.