Android Question Detect two date remain hour

Blue.Sky

Active Member
Licensed User
Longtime User
Hi
I have two date 2015-5-12 and 2015-6-12
I can use DateUtils.PeriodBetweenInDays function on dates
and get days,hour,minute,second
This date is special offer for product that i have to show it in label from up to down
example from 59 second to 0 or 59 minute to 0
Now my question is :
how detect how hour remain from two date when app close and open?
 

DonManfred

Expert
Licensed User
Longtime User
Not use juse date alone. Compare two Datetime values with DateUtils.PeriodBetween
how detect how hour remain from two date when app close and open?
Store the referencetime to a key value store and read it back after restart could be a solution

There are plenty of examples if you just search for them
 
Upvote 0

Blue.Sky

Active Member
Licensed User
Longtime User
Not use juse date alone. Compare two Datetime values with DateUtils.PeriodBetween

Store the referencetime to a key value store and read it back after restart could be a solution

There are plenty of examples if you just search for them
Thank you.I use DateUtils.PeriodBetween and get information between two
I can get hour and reverse it with timer
But i user clean data,timer again show last hour
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…