Package-level declarations
Types
Thrown when no valid access token is available for an A2A gRPC call.
Owns the gRPC channel to the A2A service and hands out stubs that already send the a2a-version header. Per-call auth metadata is added separately by A2aGrpcClient.
Connection settings for the A2A gRPC service.
Converts server stream envelopes into A2aEvents. Never throws: anything it cannot understand becomes A2aEvent.Unknown. Artifacts are routed by Artifact.metadata["action"]; an action name this SDK does not know is ignored.
Thin auth layer for A2A gRPC calls. All token validity and refresh decisions are delegated to the AuthTokenSource; this class only attaches the bearer token and retries once on UNAUTHENTICATED.
One conversation with the A2A agent. A session spans many turns (one user message and the server's streamed reply each) that all share the same contextId.
Thrown from a turn flow when the turn cannot start or fails.
Creates and tracks A2aSessions. Hold one per app (alongside the OtvSdkClient) so sessions outlive Activities. Sessions are in memory only and do not survive process death. Several sessions may be active at once; each has its own conversation context.
Lifecycle state of a server task.
The client's report of a device action, sent with A2aSession.sendActionResult. It mirrors ActionResult in payloads.proto.
The action an artifact carries in Artifact.metadata["action"], as defined by ArtifactAction in payloads.proto. It tells the app which kind of event the artifact is.
Supplies access tokens for authenticated A2A gRPC calls.
Joins A2aEvent.ChatText chunks into the full text per artifact.
Display-ready details of one title (ContentDetails). Every field is optional: the server sends empty strings, zeros and empty lists for "not available", which are null or empty here. Show the text as plain text, never as HTML.
One row of content with its heading and the tool that produced it.
A rating of a title; an empty field is null.
Reports which input features this device supports. No method throws; an unsupported or unexpected condition is reported as false.
One episode of a SeasonInfo.
ML Kit implementation of TranslationEngine. Models (about 30 MB per language) are downloaded on demand through Google Play services and kept on the device.
Translator and TranslationAvailability backed by an on-device TranslationEngine.
Adapts OtvSdkClient, the auth authority, to the AuthTokenSource contract.
Joins A2aEvent.RenderContent updates of one artifact into one rail. A server may stream a rail in pieces; items are matched by contentId and a later piece fills in or replaces fields.
The tool that produced a content rail.
Outcome of a personalised review lookup.
One season of a series in ContentDetails.
Settings for one A2aSession.
A session-level error reported on A2aSession.errors or thrown as A2aSessionException. message is for developers; show your own text to the user. The original exception, when there is one, is in cause.
Lifecycle state of an A2aSession.
A language the speech recognizer can be asked to recognize.
Tells whether text can be translated to English on this device.
The on-device language tools OnDeviceTranslator needs; ML Kit provides the real one.
Result of Translator.translateToEnglish.
Converts user text to English before it is sent. The backend is swappable.
Helpers for voice input. Android speech recognition runs in another app and returns through an Activity result, so the SDK does not record audio itself:
Tells whether an app can handle ACTION_RECOGNIZE_SPEECH on this device.
Properties
The action id sent with every ActionResult.
Value of the x-device-types header the A2A service requires on every call.