模拟按键

KeyEvent kdown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK);
yourActivity.dispatchKeyEvent(kdown);
KeyEvent kup = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK);
yourActivity.dispatchKeyEvent(kup);


http://stackoverflow.com/questions/13876288/how-to-simulate-home-back-menu-search-task-and-volume-buttons

http://stackoverflow.com/questions/2717954/android-simulate-back-button



http://www.apkbus.com/forum.php?mod=viewthread&tid=56899

你可能感兴趣的:(android,模拟,key,返回,back,simulate,按键)