我需要在Android中调用一个关键的preSS事件。 任何建议?????
I need to invoke a key press event in android . Any suggestions ?????
您需要使用仪器仪表类:
You need to use the instrumentation class :
Instrumentation i = new Instrumentation();
i.sendKeyDownUpSync(KeyEvent.KEYCODE_A);
这应该是相当于pssed在键盘上甲A $ P $。
This should be equivalent to a A pressed on the keyboard.