please try below code
driver.pressKeyCode(AndroidKeyCode.BACK); // it will android device back button
if you want to perform any other operation with android device keys you can use same approach.You will get keys in AndroidKeyCode .
hope these helps you.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.