tags:

views:

368

answers:

1

When I exit my android application it resumes to the previous screen. How can I exit the Android application properly?

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // TODO Auto-generated method stub
    switch(item.getItemId()) {
         case EXIT:
             try {
                 this.finish();
             } catch(Exception e) {
             }
             break;
      }
      return false;
 }
+2  A: 

The answer is that you shouldn't exit your Android application.

Have a look at this excellent answer for more information.

Dave Webb
thank u dave. i got the solution from the information,
saravanan