Search code examples
androidsystemtime

How to check Use network-provided values checkbox programatically in android


it is possible to check use network provided values chekbox pro-grammatically?I want to check that checkbox using code.How can I do it?

I want to check marked checkbox using programme


Solution

  • Try this:

    YourActivity.this.startActivity(new Intent(Settings.ACTION_DATE_SETTINGS));
    

    It is not possible to enable it directly from your code. This code will help you to automatically go to that screen.You can then check or uncheck it and then return back to the your screen.