android-ago icon indicating copy to clipboard operation
android-ago copied to clipboard

Save timeago when close the app

Open jamescarl15 opened this issue 7 years ago • 1 comments

Can I save the "setReferenceTime" even if the app destroys?

jamescarl15 avatar Jun 05 '18 05:06 jamescarl15

This library implements onSaveInstanceState() and onRestoreInstanceState() so that the reference time is retained for example across configuration changes.

However, it does not do anything to persist the reference time when the activity is finished or if your app process is killed when it is in the background. You will need to do that on your own.

I see that RelativeTimeTextView does not have a getReferenceTime() method. I've created #59 to track this. Once that is in implemented you can use getReferenceTime() and save it to persistent storage.

curioustechizen avatar Jun 05 '18 07:06 curioustechizen