Wake up periodically from standby?

I have an application that should send a periodic heart rate to the server, but when the phone goes into standby mode, the background heartbeat flow dies. Is there anyway to wake the phone in standby mode, send a heartbeat, and then return to software programming? I want to avoid using PARTIAL_WAKE_LOCK if possible.

thank

+3
source share
1 answer

In any case, to wake the phone in standby mode, send a pulse, and then sleep again programmatically?

AlarmManager _WAKEUP. , ( WakefulIntentService, , , -).

PARTIAL_WAKE_LOCK, .

- WakeLock, -. AlarmManager, WakeLock , 100% .

+4

Source: https://habr.com/ru/post/1761800/


All Articles