Search code examples
javaandroideclipseandroid-activityactivity-finish

onBackPressed not Called Immediately - No Keyboard for id 0 - Android


I am overriding the onBackPressed method in my app :

public void onBackPressed() {

        System.out.println("BACK PRESSED");
        mp.stop();
        finish();
    }

The problem is that the back button needs to be pressed at least three times before this method is called. The first couple of times I get :

No Keyboard for id 0
Using Default Keymap : /system/user/keychars/qwerty.kcm.bin

Can anyone spot what is wrong ?


Solution

  • call super.onBackPressed();

    for more detail see this link