Remove my app from the active group killing my service
I created a service to handle my AsyncTasks, like uploading a file to a server or uploading it. When I remove my app from the last action menu, my service is killed. Is this normal behavior? If so, one solution would be to set it as a foreground service with startForeground(int, Notification)
, but I have to display a notification, and I don't want it as I already show it for every AsyncTask running.
How does the "play store" app download apps and keep downloading even if I remove the "play store" from the recent action menu?
source to share
Is this normal behavior?
Yes. Android has terminated a background process as requested by the user.
If so, one solution would be to set it as a foreground service using startForeground (int, Notification), but I have to display a notification and I don't want it as I already show it for every AsyncTask that is running.
Please do not show a separate Notification
"for each running AsyncTask program. At best, show one Notification
. Few, if any, applications are important enough to warrant a separate one Notifications
.
source to share