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.
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: