AoaTargetPreparer
public
class
AoaTargetPreparer
extends BaseTargetPreparer
ITargetPreparer
that executes a series of actions (e.g. clicks and swipes) using the
Android Open Accessory (AOAv2) protocol. This allows controlling an Android device without
enabling USB debugging.
Accepts a list of strings which correspond to AoaDevice
methods:
- Click using x and y coordinates, e.g. "click 0 0" or "longClick 360 640".
- Scroll, fling, or drag using coordinates. The first pair of numbers indicate the starting
position, and the second is the destination, e.g. "scroll 0 0 360 640".
- Write a string of alphanumeric text, e.g. "write hello world" will type "hello world".
- Repeated keystrokes using USB HID usages, e.g. "key 5* 0x2B" to press TAB five times.
- Key combinations using USB HID usages, e.g. "key 0x52 0x51 0x28" to press UP, DOWN, ENTER.
- Wake up the device with "wake".
- Press the home button with "home".
- Press the back button with "back".
- Wait for a duration in ISO 8601 format, e.g. "sleep PT30S" to wait for 30 seconds.
Summary
Public constructors
AoaTargetPreparer
public AoaTargetPreparer ()
Public methods
setUp
public void setUp (ITestDevice device,
IBuildInfo buildInfo)
Parameters |
device |
ITestDevice |
buildInfo |
IBuildInfo |