Is there a way to detect when the user has changed the clock time on their device?

前端 未结 5 1110

Is there a way to detect when the Android system clock has been reset by the user in Android?

I\'m designing an app which uses system time to determ

5条回答
  •  清酒与你
    2020-11-27 03:29

    A little notice to the answer of matt5784: I found out that on Android 4.1.2 the intent action is not available, don´t know if this is for all android versions or just at mine. Instead of

         "android.intent.action.ACTION_TIME_CHANGED"
    

    use

         "android.intent.action.TIME_SET"
    

提交回复
热议问题