By default, an activity belongs to the task that started it. In many cases, that's the right answer.
If, however, you want control to go to an already-running copy of your activity, from perhaps another task, add android:launchMode="singleTask"
on your <activity>
element in the manifest. Quoting the documentation:
The system creates a new task and instantiates the activity at the root of the new task. However, if an instance of the activity already exists in a separate task, the system routes the intent to the existing instance through a call to its onNewIntent() method, rather than creating a new instance. Only one instance of the activity can exist at a time.