Faced such a problem. If the user enters Activation A, and then collapses it, then when opening the same activation (but already through a push-notification, and not the application history), it is not recreated.
To solve this problem, I used the Intent.FLAG_ACTIVITY_CLEAR_TASK flag, but it can happen that the user has not finished working with the current activation and has not minimized it, but already clicked on the notification. Accordingly, you need to show him the dialogue "Are you sure? You will go out forever!" But how? What method is called when using 'Intent.FLAG_ACTIVITY_CLEAR_TASK'?
If no, then how to solve this problem?