I want to change android system's date and time through third party application programmatically. If I change it from any application it should affect system's date and time.It should not open system's setting application, changes should be made only from my application.
Asked
Active
Viewed 845 times
1
-
You need `android.permission.SET_TIME` .This permission has the protectionLevel of `signatureOrSystem` . So if you can gain this permission either because you rooted your phone or built and signed your own platform image then you can change the date and time, just like changing time zone. – Sunil Sunny Sep 22 '17 at 06:32
1 Answers
0
The user application does not have permission to change the device time. we can only redirect the user to date time activity of system
startActivity(new Intent(android.provider.Settings.ACTION_DATE_SETTINGS));
Unfortunately, there is no way to link them directly to the time setting (which would save them one more click).
To do it by code you need to create admin level app.

vishal jangid
- 2,967
- 16
- 22
-
How can I create admin level app? or what are the requirements to create admin level app? – vaishakhi shah Sep 22 '17 at 05:59
-
if you create admin level app than you need to singed app by OEM like samsung, sony, htc. – vishal jangid Sep 22 '17 at 06:03
-
use this link to create admin level app https://developer.android.com/guide/topics/admin/device-admin.html – vishal jangid Sep 22 '17 at 06:03
-
Admin level app can change password or encrypt the storage of a client application, but how it will change systems date and time? – vaishakhi shah Sep 22 '17 at 06:20
-