java - How do I save chronometer elapsed time in android app -
i'm developing sort of parking meter counter app few specific locations. app asks user (dropdown menu, saves column letter , number, a6) , shows screen given location, timer (chronometer class) counting 0 , price has paid on exit (calculated using elapsed hours * base price). this works nicely, until user or os kills app (task manager or memory management). then, next time user opens app, he's @ main menu , location, time , price has been lost. i need way save of user's information , able load on app restart. initially had thought save user's location , exact time chronometer started (datetime.now() maybe?) .txt file in internal storage read: mallname,columnletter,columnnumber,starttime this way, if app killed, or time app started scratch, mainactivity first check if file.txt exists in app's internal storage, if does, starts lastpage activity, reading .txt file pass values parameters (thus, comma separation). if there's no such file, carry on norm...