X
X
xmdv2019-01-28 15:11:25
Android
xmdv, 2019-01-28 15:11:25

Why is the Android service paused?

I'm writing an Android app that runs some long running background task. I created a service for this, inherited it from IntentService and do all the long work in it. Also, in order for the system not to kill this service, I dspsdf. it has a startForeground method. The OS does not kill him, but freezes him, as it were. If you exit the application, but continue to use the phone, the service continues to work in the background. But if you turn off the phone screen, then the service is suspended almost immediately. If you turn on the screen again, the service resumes. Maybe someone faced a similar problem and knows how to solve it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question