HOW TO PERFORM ACTION IN ANDROID HARDWARE BACK BUTTON?

Kamlakar Singh

Total Post:194

Points:1396
Posted by  Kamlakar Singh
 983  View(s)
Ratings:
Rate this:
 perform action in android hardware back button
  1. sandy taylor

    Post:46

    Points:324
    Re: How to perform action in android hardware back button?

        This  is code of android hardware back button. Here you can perform your action

    @Override

    public boolean onKeyDown(int keyCode, KeyEvent event)  {

        if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.ECLAIR

                && keyCode == KeyEvent.KEYCODE_BACK

     

    // your code here

          }

     

        return super.onKeyDown(keyCode, event);

    }

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!