-4
我設置了多個鬧鐘,爲了控制它們,我改變了手機的時間。他們會正常工作?換句話說,如果我改變了手機的時間,鬧鐘會崩潰嗎?如果我改變手機的時間,鬧鐘經理會做什麼?
我設置了多個鬧鐘,爲了控制它們,我改變了手機的時間。他們會正常工作?換句話說,如果我改變了手機的時間,鬧鐘會崩潰嗎?如果我改變手機的時間,鬧鐘經理會做什麼?
我不知道你的意思是崩潰。但是,警報只知道設備的時間,所以如果您確實需要更改設備時間,則應該改變設備時間。
那麼這一切都取決於您在警報管理器的設置方法中傳遞的類型。
如果你已經使用ELAPSED_REALTIME或ELAPSED_REALTIME_WAKEUP,報警將不會觸發根據設備時間
RTC
Added in API level 1
int RTC
Alarm time in System.currentTimeMillis() (wall clock time in UTC). This alarm does not wake the device up; if it goes off while the device is asleep, it will not be delivered until the next time the device wakes up.
ELAPSED_REALTIME
Added in API level 1
int ELAPSED_REALTIME
Alarm time in SystemClock.elapsedRealtime() (time since boot, including sleep). This alarm does not wake the device up; if it goes off while the device is asleep, it will not be delivered until the next time the device wakes up.
,如果你有用戶RTC或RTC_WAKEUP,報警將被觸發