The application looks something like this: MainActivity -> UserActivity -> DetailsActivity. (approximate order of activities).
I would like to close the application when the back button is clicked in DetailsActivity (third activity in the row).
Wanted to know if it's good practice to do that and what would be the best way to do that?