Android how to measure time (few days) in app -
Sorry, if the title is confusing, then I will explain: I am creating an app that registers the user's action , Writes it as a string in the form of a database (eg, 17 July 2014 17:45), and then, when the first entry is made, then I have to measure 3 days, so when it lasts 3 days , Then I will ask the user to do something. How can I do this?
You should use Unix and make it long
.
Long time = System TimeTimilis (); 3 day difference: Boolean ish daydaily (long time saved time) {if (SystemCurrenttime milliseconds) - saved time> 1000 * 3600 * 24 * 3) back true; return false; }
edit value corrected
Comments
Post a Comment