キーイベント発行
ググってすぐ見つかるページでは、KeyEvent.ACTION_DOWN を dispatchKeyEvent してるだけなんだけど、それだと上手くいかなかった・・。なので、試しに KeyEvent.ACTION_UP もやってみたら上手くいったのでメモしておく。
dispatchKeyEvent( new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK) ); dispatchKeyEvent( new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK) );