How to prevent user changing system date/time (in Android)?

Faisal Silitonga picture Faisal Silitonga · Oct 17, 2012 · Viewed 11.4k times · Source

I have googled, but I can find no advice to prevent user change system date/time in android.

We are developing an Enterprise Application, we would like to prevent the user of the device to be able to set time settings. In other words, we want to set a policy which defines, that user cant change date and time in android device. Are there any recommendations to do this? Thanks.

Answer

Stephan Branczyk picture Stephan Branczyk · Dec 24, 2013

Here is a third alternative that should significantly save on battery life:

Register a BroadCast Receiver for when the time gets changed by the user. Then disable the app until the device time is checked against network-time or server-time.

Those Broadcast Receivers exist. I just checked now with this app called Internal Broadcast Monitor I just found on Google Play.

enter image description here

Here is the interesting part below where I changed both the time and the date:

enter image description here

And below is the part where I changed the time zone: enter image description here.