public final class DeviceInteraction


API surface for performing device-centric operations.

Summary

Nested types

public static class DeviceInteraction.Companion

Public constructors

Public methods

final @NonNull DeviceInteraction

Performs the given action on the test device.

Public constructors

DeviceInteraction

@Inject
public DeviceInteraction(@NonNull DeviceController deviceController)

Public methods

perform

public final @NonNull DeviceInteraction perform(@NonNull DeviceAction action)

Performs the given action on the test device. This method should not be called on the main thread. The calling thread is blocked until the requested device action is completed.

Parameters
@NonNull DeviceAction action

the DeviceAction to execute.

Returns
@NonNull DeviceInteraction

this interaction for further perform/verification calls.

Throws
kotlin.IllegalStateException

when being invoked on the main thread.