Xamarin form: Is there secure way to prevent user changing the time

181 Views Asked by At

I am creating the offline application require the user to clock in and clock out in a offline scenario. The problem I am facing here is that how can I make sure the user not messing up the date/time setting in the device and faking the clocking time.

1

There are 1 best solutions below

0
Michał Żołnieruk On

One solution would be to check device uptime (time the device is on). I'm sure you can do it on iOS (see how here), please check if it's possible on your other platforms. You can get the device uptime at the beginning of the work and at finish to get total work time. Problematic scenario would be when the user restarts the phone, since the uptime would reset.