jamcoder jamcoder - 1 year ago 98
Android Question

Lock the date & time settings android

Is it possible to lock or set a password for the date and time settings of android device which is running in ICS & Jelly Bean. I've developed an android application for the company that most of the functions are dependent on Date & Time of the device since it can work even offline when internet connection is not available on area. The device is provided by the company to the users, so assuming that we have the rights to limit the settings.

I have read one of the Android tutorial from Android Developers Guide which is for Device Administration but it didn't cover what I need for the app.


Any idea, available code or tutorial on how to achieve this is highly appreciated. Thank you.

Answer Source

I think this is not possible... I've been searching for a solution and I've found nothing!

What I did was check if the user have uncheck "date/time autosync" when using some specific features that relies on system date/time and don't let the user use them.


Settings.System.getInt(context.getContentResolver(), Settings.System.AUTO_TIME);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download