Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void quit() {
- int pid = android.os.Process.myPid();
- android.os.Process.killProcess(pid);
- System.exit(0);
- }
- Intent i= new Intent(getapplicationcontext,TARGETACTIVITY.class);
- finish();
- startActivity(intent);
- public void close()
- {
- Intent intent = new Intent(Intent.ACTION_MAIN);
- intent.addCategory(Intent.CATEGORY_HOME);
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- startActivity(intent);
- }
- System.exit();
- try{
- -------
- -----
- ----
- }
- Catch (Exception e)
- {
- exception.printStackTrace();//using alert box to show your exception.
- finish(); //use this one of your Application it will close the application.
- }
- Intent intent = new Intent(Intent.ACTION_MAIN);
- intent.addCategory(Intent.CATEGORY_HOME);
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- startActivity(intent);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement