My application have a service and an activity. Sometimes the service will send a broadcast, if my activity receive the broadcast, i will start the activity and show a dialog. But if i need to start an activity successfully in onReceiver(), i must set flag FLAG_ACTIVITY_NEW_TASK for the activity, and the activity only could be instantiated once, if i start the activity again, it couldn’t be instantiated again. I can show other message of service when my appliaction have show the activity yet.
How can i start a some activity many times in onReceiver()?
Add flag FLAG_ACTIVITY_MULTIPLE_TASK, the flag would start a new activity in any case.