I have two activities in “Recent Applications”. For those that don’t know, Recent Applications is when you long press the home button.
I know why this happens. I am starting my app from a BroadCastIntentReceiver. Then I start my app from the normal launcher icon.
When I press the first icon in Recent Applications, the app opens from the Main activity. However, when I press the second icon, the app opens from the place where the BroadCastIntentReceiver starts the app, this is called PictureActivity.
I have been looking into taskAffinity and am having trouble deciding the most simple way to solve this issue.
Thank you!
When your BroadCastIntentReceiver builds its intent to launch the PictureActivity, try setting this flag on the intent:
Reference: Android dev site.