AoaTargetPreparer

public class AoaTargetPreparer
extends BaseTargetPreparer

java.lang.Object
   ↳ com.android.tradefed.targetprep.BaseTargetPreparer
     ↳ com.android.tradefed.targetprep.AoaTargetPreparer


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".
  • Swipe between two sets of coordinates in a specified number of milliseconds, e.g. "swipe 0 0 100 360 640" to swipe from (0, 0) to (360, 640) in 100 milliseconds.
  • Write a string of alphanumeric text, e.g. "write hello world".
  • Press a combination of keys, e.g. "key RIGHT 2*TAB ENTER".
  • Wake up the device with "wake".
  • Press the home button with "home".
  • Press the back button with "back".
  • Wait for specified number of milliseconds, e.g. "sleep 1000" to wait for 1000 milliseconds.

Summary

Public constructors

AoaTargetPreparer()

Public methods

void setUp(TestInformation testInfo)

Public constructors

AoaTargetPreparer

public AoaTargetPreparer ()

Public methods

setUp

public void setUp (TestInformation testInfo)

Parameters
testInfo TestInformation

Throws
BuildError
DeviceNotAvailableException
TargetSetupError