Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#constants) \| [Fields](https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#lfields) \| [Methods](https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#inhmethods)

# ExecuteInIsolatedServiceRequest.OutputSpec

*** ** * ** ***

` public static class ExecuteInIsolatedServiceRequest.OutputSpec `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.adservices.ondevicepersonalization.ExecuteInIsolatedServiceRequest.OutputSpec |

<br />

*** ** * ** ***

<br />

**This class was deprecated in API level 37.**   

The ODP APIs are deprecated and will not be supported in future Android releases. There is no direct replacement API available. Developers currently integrated with these APIs must cease further integration efforts. For comprehensive details regarding this deprecation and the future roadmap of Privacy Sandbox on Android, please consult the official Privacy Sandbox developer documentation and announcements: <https://privacysandbox.google.com>

The set of spec to indicate output of `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedService`. It's mainly used by platform. If `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec` is set to `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#DEFAULT`, OnDevicePersonalization will ignore result returned by `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedService`. If `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec` is built with `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#buildBestValueSpec(int)`, OnDevicePersonalization will verify `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput#getBestValue()` returned by `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedService` within the max value range set in `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#getMaxIntValue()` and add noise.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#OUTPUT_TYPE_BEST_VALUE` If set, `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceResponse#getBestValue()` will return an integer that indicates the index of best values passed in `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest#getAppParams()`. |
| `int` | `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#OUTPUT_TYPE_NULL` The default value of OutputType. |

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec` | `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#DEFAULT` The default value of `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec`. |

| ### Public methods ||
|---|---|
| ` static https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec` | ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#buildBestValueSpec(int)(int maxIntValue) ` Creates the output spec to get best value out of `maxIntValue`. |
| ` int` | ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#getMaxIntValue()() ` Returns the value set in `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#buildBestValueSpec(int)`. |
| ` int` | ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#getOutputType()() ` Returns the output type of `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedService`. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Constants

### OUTPUT_TYPE_BEST_VALUE

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int OUTPUT_TYPE_BEST_VALUE
```

If set, `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceResponse#getBestValue()` will return an integer that indicates the index of best values passed in `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest#getAppParams()`.

<br />

Constant Value: 1 (0x00000001)

### OUTPUT_TYPE_NULL

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int OUTPUT_TYPE_NULL
```

The default value of OutputType. If set, OnDevicePersonalization will ignore result returned by `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedService` and `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceResponse` doesn't return any output data.

<br />

Constant Value: 0 (0x00000000)

## Fields

### DEFAULT

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final ExecuteInIsolatedServiceRequest.OutputSpec DEFAULT
```

The default value of `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec`.

<br />

## Public methods

### buildBestValueSpec

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static ExecuteInIsolatedServiceRequest.OutputSpec buildBestValueSpec (int maxIntValue)
```

Creates the output spec to get best value out of `maxIntValue`. If set this, caller can call `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceResponse#getBestValue()` to get result.

<br />

| Parameters ||
|---|---|
| `maxIntValue` | `int`: the maximum value `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedWorker` can return to caller app. Value is 0 or greater <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec` | This value cannot be `null`. <br /> |

### getMaxIntValue

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getMaxIntValue ()
```

Returns the value set in `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#buildBestValueSpec(int)`. The value is expected to be `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceResponse#DEFAULT_BEST_VALUE` if `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#getOutputType()` is `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#OUTPUT_TYPE_NULL`.

<br />

| Returns ||
|---|---|
| `int` | Value is `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceResponse#DEFAULT_BEST_VALUE` or greater <br /> |

### getOutputType

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getOutputType ()
```

Returns the output type of `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedService`. The default value is `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#OUTPUT_TYPE_NULL`.

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#OUTPUT_TYPE_NULL` - `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#OUTPUT_TYPE_BEST_VALUE` |