0

We have a Java android application that can work both online and offline. The purpose of the application is to be able to run a test on a scheduled date.

The problem is that if the user changes the date of the phone system, then the test date is no longer consistent with what was scheduled and the results will be wrong.

For example, the current date is 17/04/23 10:20:00 and we have programmed a test for 17/04/23 10:25:00. If the user changes the date to 17/04/23 09:20:00 then he will still have 1h05mn before the test instead of 5mn, which is not in accordance with the usage.

Knowing that the application can work in disconnected mode, what solution should we adopt to avoid this?

Why I code
  • 13
  • 3
  • You can use the Android system boot time as reference. Will not work if the user also reboots the device, though. – Ole V.V. Apr 17 '23 at 13:13

0 Answers0