相同class的startactivity使用Intent.FLAG_ACTIVITY_MULTIPLE_TASK

void android.content.Context.startActivity(Intent intent)
Launch a new activity. You will not receive any information about when the activity exits.

Note that if this method is being called from outside of an android.app.Activity Context, then the Intent must include the Intent.FLAG_ACTIVITY_NEW_TASK launch flag. This is because, without being started from an existing Activity, there is no existing task in which to place the new activity and thus it needs to be placed in its own separate task.

This method throws ActivityNotFoundException if there was no Activity found to run the given Intent.

Parameters:
intent The description of the activity to start.
Throws:
ActivityNotFoundException
See Also:
PackageManager.resolveActivity

你可能感兴趣的:(android)