1

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.

  • 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 Answers1

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