Calling Activity.finish() on the root splash screen activity should automatically close all child windows/activities and exit out of the app.
It should only work this way for the root activity. Finishing/closing an activity in the middle of the stack should not automatically close the child activities.
This is mostly needed for Titanium apps launched via the Java startActivityForResult() method. In this case, the Titanium developer must call the Activity.setResult() method on the root activity and exit out to respond to the other app with the result. You typically call Activity.finish() just after Activity.setResult() when following Google's examples.
Steps to reproduce:
- Build and run with the below code on Android.
- Tap on the "Close" button.
- Notice that the app does not exit out.