I want to develop a sleep tracking app that should work even when device's screen gets off. I'm curious about whether Service
or Handler
go to sleep when device screen is off. I learned the life-cycle of activity, so I don't think a Handler
would work since activities go to sleep when device's screen is off, and Handlers
are dependent on its activity. But the Service
is a background process, so I think it might work.
So I want the device to be alive even when device's screen is off. Could you give me some advice for this?