Making the user change the time in Android

前端 未结 2 2017
悲&欢浪女
悲&欢浪女 2020-12-18 12:31

Android doesn\'t appear to provide a way for a user application to change the system time. What I would like to do instead is to get the user to change the time. It is easy

相关标签:
2条回答
  • 2020-12-18 13:13

    In case someone wants to open from ADB

    adb shell am start -a android.settings.DATE_SETTINGS
    
    0 讨论(0)
  • 2020-12-18 13:27

    Is it possible to link directly to the set time option?

    Try:

    startActivity(new Intent(android.provider.Settings.ACTION_DATE_SETTINGS));
    

    Is it possible to check that the user set the time correctly?

    :: shrug ::

    After the application gets control again, examine the time.

    0 讨论(0)
提交回复
热议问题