How to quit an application programmatically through button click
use this it is work for me:
quitBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View paramView) {
moveTaskToBack(true);
MainActivity.this.finish();
}
});
use this code...i hope this will help you..
quitBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View paramView)
{
finish();
moveTaskToBack(true);
}
});