how can I clear only a variable number of activities from the activity stack?
Lets say I want to clear 3 activities, I won’t use android:noHistory in the manifest, I won’t use a method to clear the whole stack
and maybe I could call finish(); finish(); finish(); under a certain condition, but that doesn’t seem right.
is there a known method to do this?
You could register a
BroadcastReceiverin the classes you want to finish, then send the broadcast when you want to finish them.