问题
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,
回答1:
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.
来源:https://stackoverflow.com/questions/54208334/is-it-possible-to-track-geolocation-with-a-service-worker-while-pwa-is-not-open