I’ve used a simple XML parse script that displays banner images within our app upon load. These images are links to various external pages..
This works fine if the user opens the app from a closed state as it runs on page load – but if a user has the app minimized/running in background the script will not run to update – so there is the possibility of the ads/external pages being out of sync.
I considered adding a timer function to run every 5 mins – if this is possible, else alternatively whether there is a way to detect when the app is re-activated so that I could trigger the script again?
Does anyone have any suggestions?
Cheers
Paul
This is an event that fires when a PhoneGap application is put into the background.
and
This is an event that fires when a PhoneGap application is retrieved from the background.
From the api docs of phonegap 🙂