Simple-Clock icon indicating copy to clipboard operation
Simple-Clock copied to clipboard

Allow triggering an alarm while device is off

Open tibbi opened this issue 2 years ago • 3 comments

A new permission Power Off Alarm or so might be needed

tibbi avatar May 17 '23 14:05 tibbi

@tibbi In Android, it is not possible to trigger an alarm while the device is completely powered off. When the device is powered off, all processes and applications, including alarms, are not active.

However, if the device is in a sleep mode or standby mode, you can schedule an alarm to wake up the device and trigger an action.

Let me know your thoughts on this or if I misunderstood the feature request.

liyamahendra avatar May 18 '23 06:05 liyamahendra

Just to add, RTC_WAKEUP flag cannot wake up a device that is completely turned off. The RTC_WAKEUP flag is only effective when the device is in sleep mode or idle state, such as when the screen is turned off or the device is in a low-power state.

liyamahendra avatar May 18 '23 06:05 liyamahendra

note for future reference: Some relevant LineageOS commits for implementing this are at https://github.com/LineageOS/android_packages_apps_DeskClock/commit/af3a2d29554da8b5323064a1823cdbbff5eab6e4 and https://github.com/LineageOS/android_packages_apps_DeskClock/commit/cbde2cd2febd66c180bc5cf19672b5f26dfd89cb

tibbi avatar Jun 09 '23 16:06 tibbi