I am developing an Android application that also includes a Service. The Scroll to Exit function in the list of recent ICS applications closes the application as expected, but the Service simply exits with it and does not receive the onTaskRemoved () callback to tell it to clear (or onDestroy ())):
http://developer.android.com/reference/android/app/Service.html#onTaskRemoved(android.content.Intent )
This leaves a notification icon in the status bar, and I need to make sure that it is removed when the application exits.
I tried setting android: stopWithTask to false (and true) in Manifest.xml and that doesn't seem to matter.
<service
android:name="com.test.TestService"
android:stopWithTask="false"
/>
Any ideas why the onTaskRemoved () callback is not accepted?
Megsy source
share