Added in API level 34

CarRemoteAccessManager.RemoteTaskClientCallback

public static interface CarRemoteAccessManager.RemoteTaskClientCallback

android.car.remoteaccess.CarRemoteAccessManager.RemoteTaskClientCallback


Listener for remote task events.

Summary

Public methods

abstract void onRegistrationFailed()

This is called when registering the remote task client fails.

abstract void onRegistrationUpdated(RemoteTaskClientRegistrationInfo info)

This is called when the remote task client is successfully registered or the client ID is updated by AAOS.

abstract void onRemoteTaskRequested(String taskId, byte[] data, int taskMaxDurationInSec)

This is called when a wake-up request is received/processed.

abstract void onShutdownStarting(CarRemoteAccessManager.CompletableRemoteTaskFuture future)

This is called when the device is about to shutdown.

Public methods

onRegistrationFailed

Added in API level 34
public abstract void onRegistrationFailed ()

This is called when registering the remote task client fails.

onRegistrationUpdated

Added in API level 34
public abstract void onRegistrationUpdated (RemoteTaskClientRegistrationInfo info)

This is called when the remote task client is successfully registered or the client ID is updated by AAOS.

Parameters
info RemoteTaskClientRegistrationInfo: RemoteTaskClientRegistrationInfo which contains wake-up service ID, vehicle ID, processor ID and client ID.

onRemoteTaskRequested

Added in API level 34
public abstract void onRemoteTaskRequested (String taskId, 
                byte[] data, 
                int taskMaxDurationInSec)

This is called when a wake-up request is received/processed.

Parameters
taskId String: ID of the task that is requested by the remote task server.

data byte: Extra data passed along with the wake-up request.

taskMaxDurationInSec int: The timeout before AAOS goes back to the previous power state.

onShutdownStarting

Added in API level 34
public abstract void onShutdownStarting (CarRemoteAccessManager.CompletableRemoteTaskFuture future)

This is called when the device is about to shutdown.

The remote task client should finalize the ongoing tasks, if any, and complete the given future within 5 seconds. After the given timeout, the Android system will shutdown, anyway.

Parameters
future CarRemoteAccessManager.CompletableRemoteTaskFuture: CompletableRemoteTaskFuture used by the remote task client to notify CarRemoteAccessManager that all pending remote tasks are finalized.