Android.AdServices.OnDevicePersonalization Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides the On-Device Personalization (ODP) APIs, which let an app run a service in an isolated process to personalize content with on-device data.
Classes
| Name | Description |
|---|---|
| AppInfo |
Information about apps. |
| AppInfo.InterfaceConsts |
Exposes constants from the Java interfaces implemented by AppInfo. |
| DownloadCompletedInput |
The input data for |
| DownloadCompletedOutput |
The result returned by |
| DownloadCompletedOutput.Builder |
A builder for |
| EventInput |
The input data for |
| EventLogRecord |
Data to be logged in the EVENTS table. |
| EventLogRecord.Builder |
A builder for |
| EventLogRecord.InterfaceConsts |
Exposes constants from the Java interfaces implemented by EventLogRecord. |
| EventOutput |
The result returned by |
| EventOutput.Builder |
A builder for |
| EventUrlProvider |
Generates event tracking URLs for a request. |
| ExecuteInIsolatedServiceRequest |
The request of |
| ExecuteInIsolatedServiceRequest.Builder |
A builder for |
| ExecuteInIsolatedServiceRequest.OutputSpec |
The set of spec to indicate output of |
| ExecuteInIsolatedServiceResponse |
The response of |
| ExecuteInput |
The input data for |
| ExecuteOutput |
The result returned by |
| ExecuteOutput.Builder |
A builder for |
| FederatedComputeInput |
The input data for |
| FederatedComputeInput.Builder |
A builder for |
| FederatedComputeScheduler |
Handles scheduling federated compute jobs. |
| FederatedComputeScheduler.Params |
The parameters related to job scheduling. |
| FederatedComputeScheduleRequest |
The input for |
| FederatedComputeScheduleResponse |
The result returned by |
| InferenceInput |
Contains all the information needed for a run of model inference. |
| InferenceInput.Builder |
A builder for |
| InferenceInput.Params |
Contains the parameters that identify and configure an on-device inference model. |
| InferenceInput.Params.Builder |
A builder for Params |
| InferenceOutput |
The result returned by |
| InferenceOutput.Builder |
A builder for |
| IsolatedService |
Base class for services that are started by ODP on a call to
|
| IsolatedServiceException |
A class that an |
| LogReader |
An interface to a read logs from REQUESTS and EVENTS |
| ModelManager |
Handles model inference and only support TFLite model inference now. |
| OnDevicePersonalizationException |
Exception thrown by OnDevicePersonalization APIs. |
| OnDevicePersonalizationManager |
OnDevicePersonalizationManager provides APIs for apps to load an
|
| OnDevicePersonalizationManager.ExecuteResult |
The result of a call to |
| RenderingConfig |
Information returned by
|
| RenderingConfig.Builder |
A builder for |
| RenderingConfig.InterfaceConsts |
Exposes constants from the Java interfaces implemented by RenderingConfig. |
| RenderInput |
The input data for
|
| RenderOutput |
The result returned by
|
| RenderOutput.Builder |
A builder for |
| RequestLogRecord |
Contains data that will be written to the REQUESTS table at the end of a call to
|
| RequestLogRecord.Builder |
A builder for |
| RequestLogRecord.InterfaceConsts |
Exposes constants from the Java interfaces implemented by RequestLogRecord. |
| RequestToken |
An opaque token that identifies the current request to an |
| SurfacePackageToken |
An opaque reference to content that can be displayed in a |
| TrainingExampleRecord |
One record of |
| TrainingExampleRecord.Builder |
A builder for |
| TrainingExampleRecord.InterfaceConsts |
Exposes constants from the Java interfaces implemented by TrainingExampleRecord. |
| TrainingExamplesInput |
The input data for |
| TrainingExamplesOutput |
The output data of |
| TrainingExamplesOutput.Builder |
A builder for |
| TrainingInterval |
Training interval settings required for federated computation jobs. |
| TrainingInterval.Builder |
A builder for |
| UserData |
User data provided by the platform to an |
| UserData.InterfaceConsts |
Exposes constants from the Java interfaces implemented by UserData. |
| WebTriggerInput |
The input data for
|
| WebTriggerOutput |
The result that should be returned by
|
| WebTriggerOutput.Builder |
A builder for |
Interfaces
| Name | Description |
|---|---|
| IIsolatedWorker |
Interface with methods that need to be implemented to handle requests from the
OnDevicePersonalization service to an |
| IKeyValueStore |
An interface to a read-only key-value store. |
| IMutableKeyValueStore |
An interface to a read-write key-value store. |
Enums
| Name | Description |
|---|---|
| DelegateType |
Identifies the hardware delegate that runs an inference model. |
| ModelType |
Identifies the format of an on-device inference model. |
| OnDevicePersonalizationError |
Identifies why an On-Device Personalization operation failed. |
| OnDevicePersonalizationFeature |
Identifies the availability status of an On-Device Personalization feature. |
| OutputType |
Identifies the kind of result that the caller requests from an IsolatedService. |
| TrainingIntervalSchedulingMode |
Identifies whether a federated compute training task runs one time or again at intervals. |
Remarks
Apps use OnDevicePersonalizationManager to run an IsolatedService. The service creates an IIsolatedWorker for each request. The worker can generate content to display in the app, and it can write results to on-device storage for federated analytics and federated learning. The calling app cannot read the displayed content or the stored results directly. These APIs are deprecated in Android API level 37. See the Android source and the Android package reference.