You are reading a single comment by @Ganblejs and its replies.
Click here to read the full conversation.
-
Edit: Gordon beat me to it.
To keep information between resetting/loading of apps you can act on the E.kill event.
I guess one could also make the assumption that at times with lots of app switching you probably are not doing a lot of moving around. So it probably wouldn't impact the statistics too much doing without retaining info across resets/loads.
Okay thanks but what I don't understand: Doesn't the code in yourapp.boot.js also need to save data to storage every minute? Because if I understand it correctly when I switch apps or activities any running app gets terminated and thus any saved variables (to cache the step count at the end of the last minute) get cleared (like widgets) and the boot code needs to run again?