Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
Due to the way Android's WebBrowser handles setInterval, when the "tab" is in the background (ie when used in conjunction with backgroundMode plugin), setInterval (used to send the latest value to the application) is capped to 1Hz (once per second).
This makes the plugin update at a completely different interval to that set by the application.
One solution is to use a WebWorker to hold the setInterval timer, as it is not limited by the browser.
The tricky bit is loading the script into the WebWorker, as it requires the "Content-Security-Policy" to allow local files or blobs.