LocalCommandClient

interface LocalCommandClient


Client to make local command related requests.

Use LocalCommandClientFactory to create an instance that communicates with Android Management API client app on device.

Summary

Public functions

ListenableFuture<Command>

Requests for the status of a command earlier requested to be triggered.

suspend Command

Requests for the status of a command earlier requested to be triggered.

ListenableFuture<Command>

Requests a command to be executed by Android Device Management API.

suspend Command

Requests a command to be executed by Android Device Management API.

Public functions

getCommand

fun getCommand(request: GetCommandRequest): ListenableFuture<Command>

Requests for the status of a command earlier requested to be triggered.

Returns
ListenableFuture<Command>

ListenableFuture representing the command status of the command if it was scheduled.

getCommandAwait

suspend fun getCommandAwait(request: GetCommandRequest): Command

Requests for the status of a command earlier requested to be triggered.

Returns
Command

The command status of the command if it was scheduled.

issueCommand

fun issueCommand(request: IssueCommandRequest): ListenableFuture<Command>

Requests a command to be executed by Android Device Management API.

Returns
ListenableFuture<Command>

ListenableFuture representing the Command if it was scheduled. Returns a failed ListenableFuture if the request failed.

issueCommandAwait

suspend fun issueCommandAwait(request: IssueCommandRequest): Command

Requests a command to be executed by Android Device Management API.

Returns
Command

the Command if it was scheduled.