Android app appears multiple times in the 'Recent Apps' list
A number of users of my app have reported that on the Nexus One, running Froyo 2.2, the app appears multiple times in the 'Recent Apps' list that is displayed when you long press the home button.
Personally, I have not been able to replicate the issue. Have tried killing the app with a task killer then restarting it to see if that would cause the app to appear more than once on the list. Also tried spawning multiple thread from within an activity in the app, but still no go. I have also tested on Droid phones running 2.2 as well as on the 2.2 emulator but to no avail. It is curious that only Nexus One Froyo users experience the issue.
The app has one main launcher activity, about 30 different activities and is divided into 4 main tasks开发者_JAVA百科 to help manage the activity stack. The app also has an IntentService for running network operations in the background.
Is there any know scenario that could cause an app to appear multiple times in the 'Recent Apps' list? Is the 'Recent Apps' list populated based on the app package name e.g. com.mycompany.myappname or based on the tasks defined in the application manifest file?
As Reuben said this behaviour is caused by starting an Activity
via an Intent
with FLAG_ACTIVITY_NEW_TASK
flag enabled
精彩评论