Reputation: 3332
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?
Upvotes: 7
Views: 4094
Reputation: 3332
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.
Upvotes: 7