I want to simulate all physical buttons of our Android devices.
So is there a way to simulate:
Create a KeyEvent and publish it.
KeyEvent kdown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK);
Activity.dispatchKeyEvent(kdown);
KeyEvent kup = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK);
Activity.dispatchKeyEvent(kup);