Skip to content

Instantly share code, notes, and snippets.

@gsrathoreniks
Created July 13, 2018 09:10
Show Gist options
  • Save gsrathoreniks/d0e949a13b561260e3243b29e014b762 to your computer and use it in GitHub Desktop.
Save gsrathoreniks/d0e949a13b561260e3243b29e014b762 to your computer and use it in GitHub Desktop.
To quit an Android app completely
if(Build.VERSION.SDK_INT>=16 && Build.VERSION.SDK_INT<21){
finishAffinity();
} else if(Build.VERSION.SDK_INT>=21){
finishAndRemoveTask();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment