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
setFlags(Intent.FLAG_ACTIVITY_NEW_TASK| Intent.FLAG_ACTIVITY_CLEAR_TOP);
apart from that set launchMode to "singleTop" in FinishActivity definition in xml, overwrite onNewIntent method , you can pass some additional information as part of intent , instated of finishing your activity in onCreate finish it in onNewIntent method of activity based on some signal from calling activity or simply finish it based on your need . It maybe possible your other activities have different lauchmodes that's why they are not finishing .