I Found some codes for quit an Android application programatically. By calling any one of the following code in onDestroy() will it quit application entirely?
Similar to @MobileMateo, but in Kotlin
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { this.finishAffinity() } else{ this.finish() System.exit(0) }