Event on App open after Fast App Switching
Hi,
i was just wondering if there is some event when an app is opened on iOs4 after beeing closed through fast app switching. My idea is to check how old the contents of the current window is and than refresh it if its too old..
I checked to Docs but didnt found anythings..
Any Ideas..?
Thanks,
Jan
2 Answers
-
you could listen to the app events of 'pause' and 'resume'
rocksteady,
danno~ -
Jan
After you have generated the window and populated with your data, set a property with the current time:
var refreshTime = (new Date).getTime();
Use a window focus (or possibly open) event to detect when it is being viewed. Compare the new current time with the property:
var duration = (new Date).getTime() - refreshTime;
If it is longer than your pre-configured delay, refresh the screen's data and reset the refreshTime property.
Cheers
Hal