private void sendKeyEvent(final int KeyCode) {
new Thread() {
public void run() {
try {
Instrumentation inst = new Instrumentation();
inst.sendKeyDownUpSync(KeyCode);
} catch (Exception e) {
LogUtils.i(TAG, "Exception " + e.toString());
}
}
}.start();
}
网友评论