I am making a browser based html5 app for mobile phones that sends out it's lat and lng to a database on the web after it gets it using the html5 watchposition method.
When the app is not in the foreground, watchposition method appears to stop running, or at least it stops setting new values for global lat lng variables that it is supposed to set before those variable values get sent to the database via a jquery $.get.
Is there any solution to this problem that anyone knows of? If not, does anybody think it's a good workaround to create a very simple native app that does nothing but send out it's location and since it is native it can be kept alive? Is it possible to make a simple native app like that which does nothing but start sending out location, and also launches my web app url in the browser with one click?
Any other ideas like hybrids, etc... would be welcome as well. I'm really stuck on this one. Phonegap.... Webviews might be a possibility, but it would be a shame to go through all of that when all that I need to stay alive is just location capability and sending. The rest of the stuff in my app can sleep.