There are three different cases:
1) A user launches an app, navigates in it, pressed home and click on the app icon again to launch our app again.
2) A user
You can call this.finish() on the onPause() of your Activity, that way the activity will be closed in the three cases.
this.finish()
onPause()
Activity