How to remove a specific activity from the stack? here is an example, there is activty A, B, C, the user goes A-> B-> C, and activty C under certain conditions,
- I have to go back (activty B) (finish)
- it is necessary to go back (immediately to activty A bypassing activty B, without re-creating activty A, how to do it?)
// do this, it re-creates activty A
Intent intent = new Intent(this, A); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent);