My app is running an IntentService
to download data in the background. While doing so, it sends Notifications
to update the user about the progress.
The problem is, if the BatterySafe mode gets started, the IntentService
gets killed, the Notifications stay there though (for example saying 30%).
Is there a way, to couple the lifecycle of the notification to the lifecycle of the service?
A second problem is, that I only want one instance of the IntentService
. Is it possible, to achieve this?
In some Apps, for example the Avast AntiVirus
, the background task seems connected to the notification, indicating that this background task is running. If this is a standard solution, it seems to solve my problem, so it would be great, if you could tell me the name.