I have created a webapp that can be saved to the "Home Screen" on the iPhone. The app uses a canvas and is fairly interactive with changing state.
Whenever the app is minimised and re-opened it resets back to the initial state. The same (as expected) occurs when closing the app and reloading it.
How can I prevent the app from being reloaded when it is merely minimised?
What is the best way to persist state data so that when the app is closed and re-opened it continues seamlessly?
What events would I need to use to ensure that state data is not lost?
If possible a cross platform solution would be preferred iPhone + Android...