keep server time in app

Hi guys!
I need to avoid of any user datetime manipulation on android device during working with it.
As a main idea was to change device system datetime to actual server datetime at every sync session. Device is working offline and from time to time connecting to server to upload working results.

After some researches i found out that an user application cannot change system date and time because of security reasons. That is ok.
And i cannot prevent user of changing datetime on device manually, of course.

So maybe it would be a better approach to get the server datetime while device is on syncronization and maybe run the timer on application and use this datetime instead of DateTime.Now?
What do you think?
What would be a better solution for that? Using a timer or Stopwatch or something else?
This should be robust and must not depend on any state changes of the application.

Answers

Sign In or Register to comment.