Interface DirectAccessServiceGrpc.AsyncService (0.2.0)

public static interface DirectAccessServiceGrpc.AsyncService

A service for allocating Android devices and interacting with the live-allocated devices. Each Session will wait for available capacity, at a higher priority over Test Execution. When allocated, the session will be exposed through a stream for integration. DirectAccessService is currently available as a preview to select developers. You can register today on behalf of you and your team at https://developer.android.com/studio/preview/android-device-streaming

Methods

adbConnect(StreamObserver<DeviceMessage> responseObserver)

public default StreamObserver<AdbMessage> adbConnect(StreamObserver<DeviceMessage> responseObserver)

Exposes an ADB connection if the device supports ADB. gRPC headers are used to authenticate the Connect RPC, as well as associate to a particular DeviceSession. In particular, the user must specify the "X-Omnilab-Session-Name" header.

Parameter
Name Description
responseObserver io.grpc.stub.StreamObserver<DeviceMessage>
Returns
Type Description
io.grpc.stub.StreamObserver<AdbMessage>

cancelDeviceSession(CancelDeviceSessionRequest request, StreamObserver<Empty> responseObserver)

public default void cancelDeviceSession(CancelDeviceSessionRequest request, StreamObserver<Empty> responseObserver)

Cancel a DeviceSession. This RPC changes the DeviceSession to state FINISHED and terminates all connections. Canceled sessions are not deleted and can be retrieved or listed by the user until they expire based on the 28 day deletion policy.

Parameters
Name Description
request CancelDeviceSessionRequest
responseObserver io.grpc.stub.StreamObserver<Empty>

createDeviceSession(CreateDeviceSessionRequest request, StreamObserver<DeviceSession> responseObserver)

public default void createDeviceSession(CreateDeviceSessionRequest request, StreamObserver<DeviceSession> responseObserver)

Creates a DeviceSession.

Parameters
Name Description
request CreateDeviceSessionRequest
responseObserver io.grpc.stub.StreamObserver<DeviceSession>

getDeviceSession(GetDeviceSessionRequest request, StreamObserver<DeviceSession> responseObserver)

public default void getDeviceSession(GetDeviceSessionRequest request, StreamObserver<DeviceSession> responseObserver)

Gets a DeviceSession, which documents the allocation status and whether the device is allocated. Clients making requests from this API must poll GetDeviceSession.

Parameters
Name Description
request GetDeviceSessionRequest
responseObserver io.grpc.stub.StreamObserver<DeviceSession>

listDeviceSessions(ListDeviceSessionsRequest request, StreamObserver<ListDeviceSessionsResponse> responseObserver)

public default void listDeviceSessions(ListDeviceSessionsRequest request, StreamObserver<ListDeviceSessionsResponse> responseObserver)

Lists DeviceSessions owned by the project user.

Parameters
Name Description
request ListDeviceSessionsRequest
responseObserver io.grpc.stub.StreamObserver<ListDeviceSessionsResponse>

updateDeviceSession(UpdateDeviceSessionRequest request, StreamObserver<DeviceSession> responseObserver)

public default void updateDeviceSession(UpdateDeviceSessionRequest request, StreamObserver<DeviceSession> responseObserver)

Updates the current DeviceSession to the fields described by the update_mask.

Parameters
Name Description
request UpdateDeviceSessionRequest
responseObserver io.grpc.stub.StreamObserver<DeviceSession>