my app doesn't currently crash BUT we are trying to make it very robust and one thing we are doing is keeping track of the time of "some event" until it is manually stopped by the user.
My Intended Implementation
This is how I was planning on implementing this. I was going to make it so when they submit the initial "event" it start timing and starts the initial time and the rest of the event in our SQLite database. Then a button appears on the same submit screen to STOP timing the event. We want to have accurate time tracking for the event. I would set a flag in preferences to say there is an event that is in progress and another preference with its unique id.
Concern
So my concern is this: if the app crashes or something bad happens, I want to give the person an option to change the end time for the event. I was going to do this in one of two ways: 1. Do a check when the app starts up again (if there is a way to do this) that asks if the flag is set still, and if the app just started up. Then give them this option to edit. 2. If it exists, call an onTerminate method or something that android uses when it closes EVEN if it crashed. Again, I don't know if this exists.
Any suggestions?