物理按键应该怎么写?
zx900930 opened this issue · 2 comments
zx900930 commented
比如点击back, home, menu之类的按键
Jinnrry commented
xposed模式
InstrumentationInput.sendKeyDownUpSync( KeyEvent.xxxxx);
root模式,将对应的硬件指令发送到sendevent,
无障碍模式
zx900930 commented
无障碍模式,在class Accessibility里写function解决了
public void pressBack(){
// performGlobalAction(GLOBAL_ACTION_RECENTS);
performGlobalAction(GLOBAL_ACTION_BACK);
// performGlobalAction(GLOBAL_ACTION_HOME)
// performGlobalAction(GLOBAL_ACTION_NOTIFICATIONS)
// performGlobalAction(GLOBAL_ACTION_POWER_DIALOG)
// performGlobalAction(GLOBAL_ACTION_QUICK_SETTINGS)
// performGlobalAction(GLOBAL_ACTION_TOGGLE_SPLIT_SCREEN)
}