方法一:
public void onBack(){
new Thread(){public void run() {
try{
Instrumentation inst = new Instrumentation();
inst.sendKeyDownUpSync(KeyEvent.KEYCODE_BACK);
}catch (Exception e) {}
}
}.start();
}
方法二:
try{
Runtime runtime=Runtime.getRuntime();
runtime.exec("input keyevent " + KeyEvent.KEYCODE_BACK);
}catch(IOException e){}