I am developing a simple web application which will be used for tracking GPS position. The general idea is that every couple of minutes it'll send the GPS location back to a server with an AJAX request. Note the device will be connected to power permanently.
We ideally need this to keep running in the background when the screen is turned off. I've put together a test with a Nexus running Lollipop and Chrome and had limited success. The requests keep sending for 5-10 minutes after the screen is off, then they stop.
Oddly there still seems to be occasional requests. For my testing I'm doing a 10 second request interval, in the real world it'll be more like 5-10 minutes. Some sort of queue? If this is a thing and I can figure out how to work with it reliably it might work.
Is there any way I can get them to keep sending indefinitely? Settings in the OS/browser, or different browser (or both) maybe?