I had an app that i want it exit a specific activity for example: A -> B -> C but everytime i press the back button from activity C it always bring me back to B and from B to A before exiting. Is there anyway that I can exit directly from C no need to go through B and A again?
Asked
Active
Viewed 124 times
2 Answers
1
If you know A and B are complete, call finish()
within each of them after they've started the next activity.

mah
- 39,056
- 9
- 76
- 93
0
If you don't want an Activity to show up in the history, you can define it in the manifest file with the noHistory attribute. I've done this for a few of my activities.
<activity android:name="com.sample.activity.MyActivity" android:noHistory="true" />

brianestey
- 8,202
- 5
- 33
- 48