I want to close my application, so that it no longer runs in the background.
How to do that? Is this good practice on Android platform?
If I rely on the \"ba
Use of finishAffinity() may be an good option if you want to close all Activity of the app. As per the Android Docs-
finishAffinity()
Finish this activity as well as all activities immediately below it in the current task that have the same affinity.