For my program I have to start a bunch of sub activities dynamically.I do this in a for loop in the main activity class. The problem is all the activities get started immediately. I want the activity[i] to get started only after user has clicked next in activity[i-1] returns a result. How do i do that? I am aware of the list of activities I have to start only during run time.