I have created an app widget which, when clicked, launches an Activity in my application.
The activity it launches is NOT the main launcher activity (as set in the application manifest).
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
The activity I'm launching has launchMode="singleTop" (may be relevant)
If I launch the app from the app launcher, then press home and then the recent apps button, the app is there. I then remove the app from recent activities list or force close it.
If I then click on my widget, the activity launches fine. I then press Home and then the app does not appear in the list of recent apps.
Any ideas?
To open the recent apps overview, tap on the Home button, and then swipe upward. Make this swipe short (if you swipe too far, you'll open the App Drawer instead).
The Recents screen (also referred to as the Overview screen, recent task list, or recent apps) is a system-level UI that lists recently accessed activities and tasks. The user can navigate through the list and select a task to resume, or the user can remove a task from the list by swiping it away.
My activity was defined with flag android:excludeFromRecents="true"
in the Manifest.
Silly me, should've spotted that earlier.
Removing that flag fixes the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With