onTaskRemoved being called on App Launch on Android 14/Samsungs

On Android 14, and only on Samsung devices, if an activity starts a service in onCreate, the service calls onTaskRemoved immediately. this is basically happening on app launch, even though onTaskRemoved is only supposed to be called when the user removes the App from the Task Switcher. Why is onTaskRemoved getting triggered so early? The App is not being romoved at this time. Any insight would be appreciated.

Hi,
Did you find the issue only with Samsung?
If yes, then you can reach Developer Support for analysis. Please attach the reproduction route and dumpstate log with the problem details.

Thanks,
Shamima
Samsung Developer Program team

Sorry I didn’t reply, we coded around this issue and apparently at some point a OneUI or security update cleared the issue, and we were able to back out the manufacturer specific code…

1 Like