0

I am developing an android app which is time dependent. However, I faced an issue where user can change the functionality of the app by just overriding the time in their local machine which in turn provides the overridden time to the app. So, how one get the current time irrespective of what is set in local memory of a device?

MASHED TRACKS
  • 120
  • 1
  • 9

1 Answers1

0

Time in miliseconds

long millis = System.currentTimeMillis()

Time in hours

int hours = new Time(System.currentTimeMillis()).getHours();
Rezaul Karim
  • 830
  • 8
  • 15