I am using intents in my app and i have created an exit button. When the exit button is pressed it closes the current activity only and the remaining activities are still executed. This is my code:
b=(Button)findViewById(R.id.button1);
b.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
finish();
System.exit(0);
}
How to exit the entire app when the exit button is pressed? help me to solve to problem.