jamcoder
jamcoder

Reputation: 569

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.

http://developer.android.com/guide/topics/admin/device-admin.html

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

Upvotes: 7

Views: 2574

Answers (1)

Christian
Christian

Reputation: 7320

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.

See:

Settings.System.getInt(context.getContentResolver(), Settings.System.AUTO_TIME);

Upvotes: 4

Related Questions