I have made an application in android .It is an application related to timer.Now i have tried a lot to put controll on back button of android device that when it is pressed the process should be killed and directly displays main menu...Please help me...Thanking you in advance..!
Try this code
@Override
public void onBackPressed() {
yourActivity.this.finish;
}