Should I use acquire_causes_wakeup instead of Partial_Wake_Lock?

312 views Asked by At

I have an application that will keep running even the screen goes off. The application have a countdowntimer that will trigger an alarm sound and wake up the device when the timer goes off.(I used Countdowntimer with AlarmManager). It works well when the screen is on. However when I press the power button to turn off the screen, the alarm will not trigger and wake up the screen. The alarm only triggered immediately after I press the power button to turn the screen on.

Currently I'm using a wakelock with partial level to prevent the CPU goes sleeping after the screen is off. I have learned that partial wakelock unabled to works with the acquire_cause_wakeup, and a full wakelock seems to be just keeping the screen on.

What should i do to wake up the device when the screen is off?

0

There are 0 answers