How can I get sure that a foreground service can use CPU when app is closed, when screen is locked and when doze mode is active?
There are handlerthreads in which I plan tasks with postdelayed method within the foreground service. I list my test cases:
- Partial wakelock in foreground service:
Handlers never delay. - No wakelock, device is connected through adb:
Handlers never delay.(doze mode, background case, screen lock all tried.) - No wakelock, app is on the screen:
Handlers never delay. - No wakelock, app on the background, app not destroyed:
Handlers may delay. - No wakelock, screen on, app destroyed:
Handlers may delay. - No wakelock, screen locked:
Handlers always delay unknowningly. - No wakelock, doze active:
Handlers always delay unknowningly.
Documentations don't say much about foreground services cpu usage limitations. Are there bugs related to foreground services?