Android Tutorial The result of swiping an app from the recent apps list

One of the new features of Android 4 is the more powerful recent apps list. The user can remove tasks or applications from the list with a swipe gesture.

The result of this action is not fully documented. So I ran some tests and these are the findings:

As expected the activities are destroyed. What happens with the running services is a bit more complicated:

- Any "standard" services are destroyed. Note that Service_Destroy is not called.

- Sticky services are destroyed and are recreated after 5 seconds.

- Scheduled services (with StartServiceAt) are still scheduled. This is a different, and usually better, behavior than with some of the third party task killers.

- Foreground services (Service.StartForegroud) are not affected. This is also the only case where the process is not killed.

Edit: Sticky services should no longer be used as the OS doesn't restart those services.
 
Last edited:

Arf

Well-Known Member
Licensed User
Longtime User
Ok, so no way to detect and deal with it other than running a foreground service specifically to detect the murder of main comms service?
That would be of no good anyhow, as once the comms service is dead I can't send the the packet to shut my product down in any case.
 
Top