Our app (like i would guess most) gets its data from a website. We have a routine to ask the site if it has new data; and if yes we asynchronously fetch new data from site to store in local storage.
My question is simple. What should trigger this?
My data is loaded fine the first time the app runs; but subsequent times (for multitasking devices); the device is already ready and as far as i can tell nothing gets triggered. My app just picks up and the same place it was when i left to run some other app.
One idea i have is to simply do a “timer” based off how many tabs are opened (since i dont want to do this network action on every tab). I can trigger an update check every 10 or 20 tab clicks. Not best; but at least this way i know data will eventually be updated.