I am developing the application in which i want to close whole application on button click. I know in android we should not think about to close the application because andr
Give this a try. This should clear your activity stack.
Intent i = new Intent(this,MyActivity.class);
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);