Configure sleep mode for a Progessive Web App (PWA)? First of all I do not know the difference between &quot;sleep mode&quot; and &quot;standby&quot;, so I am most likely using the wrong term in the following problem description:
I build myself a little PWA that tracks my routes with OpenLayers. It works fine so far, but at some point the recording of a track is interrupted. I assume this is due to the automatic sleep mode, which &quot;turns off&quot; Chrome and probably therefore also &quot;navigator.geolocation&quot;.
Is there any chance to let my PWA and navigator.geolocation continue doing their work when Android is in sleep mode? And if so, is there any way to activate that setting via the PWA and without going into &quot;Settings -&gt; ... -&gt; ...&quot; (if that is at all an option)?
Thank you!
PS: The gis.stackexchange.com community recommended me to ask this question here.
PPS: A &quot;PWA&quot; (&quot;Progressive Web App&quot;), in short, is nothing else but a web application that looks and behaves like a &quot;real&quot; app. Even though it is run in a browser (in my case I only focus on Chrome), it can be used offline via service workers, the UI does not show the browser's address bar and some things more. By using all the modern browser APIs it is possible to create an app without having to go through the app store (even though a PWA could be registered as an app in the app store, too).
As it turns out, there is a Web API, &quot;Screen Wake Lock API&quot;:
https://developer.mozilla.org/en-US/docs/Web/API/Screen_Wake_Lock_API