Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

android java back button closeapp

public void onBackPressed(){
Intent a = new Intent(Intent.ACTION_MAIN);
a.addCategory(Intent.CATEGORY_HOME);
a.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(a);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #android #java #button #closeapp
ADD COMMENT
Topic
Name
6+2 =