What you're looking for is the flag:
Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
Which will do what you want - if the activity already exists in the task and stack, then it will be brought to the front, otherwise it will be recreated.
Bear in mind that if the Activity has been destroyed by the GC, then it'll be recreated anyway, and some UI components may be reset depending on where you've got intialisation code (I don't think that onCreate()
is called, but onResume()
definitely will be