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/ExecuteInIsolatedServiceResponse#constants) \| [Ctors](https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceResponse#pubctors) \| [Methods](https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceResponse#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceResponse#inhmethods)

# ExecuteInIsolatedServiceResponse

*** ** * ** ***

` public class ExecuteInIsolatedServiceResponse `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

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

<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 response of `https://developer.android.com/reference/android/adservices/ondevicepersonalization/OnDevicePersonalizationManager#executeInIsolatedService(android.adservices.ondevicepersonalization.ExecuteInIsolatedServiceRequest,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.adservices.ondevicepersonalization.ExecuteInIsolatedServiceResponse,java.lang.Exception>)`.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceResponse#DEFAULT_BEST_VALUE` The default value of `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceResponse#getBestValue()` if `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedService` didn't return any content. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceResponse#ExecuteInIsolatedServiceResponse(android.adservices.ondevicepersonalization.SurfacePackageToken,%20int)(https://developer.android.com/reference/android/adservices/ondevicepersonalization/SurfacePackageToken surfacePackageToken, int bestValue) ` Creates a new ExecuteInIsolatedServiceResponse. |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceResponse#getBestValue()() ` Returns the int value that was returned by the `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedService` and applied noise. |
| ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/SurfacePackageToken` | ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceResponse#getSurfacePackageToken()() ` Returns a `https://developer.android.com/reference/android/adservices/ondevicepersonalization/SurfacePackageToken`, which is an opaque reference to content that can be displayed in a `https://developer.android.com/reference/android/view/SurfaceView`. |

### 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

### DEFAULT_BEST_VALUE

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

```
public static final int DEFAULT_BEST_VALUE
```

The default value of `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceResponse#getBestValue()` if `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedService` didn't return any content.

<br />

Constant Value: -1 (0xffffffff)

## Public constructors

### ExecuteInIsolatedServiceResponse

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

```
public ExecuteInIsolatedServiceResponse (SurfacePackageToken surfacePackageToken, 
                int bestValue)
```

Creates a new ExecuteInIsolatedServiceResponse.

<br />

| Parameters ||
|---|---|
| `surfacePackageToken` | `SurfacePackageToken`: an opaque reference to content that can be displayed in a `https://developer.android.com/reference/android/view/SurfaceView`. This may be `null` if the `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedService` has not generated any content to be displayed within the calling app. <br /> |
| `bestValue` | `int`: an int value that was returned by the `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedService` and applied noise.If `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest` output type is set to `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#OUTPUT_TYPE_NULL`, the platform ignores the data returned by `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedService` and returns the default value `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceResponse#DEFAULT_BEST_VALUE`. If `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest` output type is set to `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#OUTPUT_TYPE_BEST_VALUE`, the platform validates `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput#getBestValue()` between 0 and `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#getMaxIntValue()` and applies noise to result. Value is `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceResponse#DEFAULT_BEST_VALUE` or greater <br /> |

## Public methods

### getBestValue

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

```
public int getBestValue ()
```

Returns the int value that was returned by the `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedService` and applied noise. If `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest` output type is set to `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#OUTPUT_TYPE_NULL`, the platform ignores the data returned by `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedService` and returns the default value `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceResponse#DEFAULT_BEST_VALUE`. If `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest` output type is set to `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#OUTPUT_TYPE_BEST_VALUE`, the platform validates `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput#getBestValue()` between 0 and `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#getMaxIntValue()` and applies noise to result.

<br />

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

### getSurfacePackageToken

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

```
public SurfacePackageToken getSurfacePackageToken ()
```

Returns a `https://developer.android.com/reference/android/adservices/ondevicepersonalization/SurfacePackageToken`, which is an opaque reference to content that can be displayed in a `https://developer.android.com/reference/android/view/SurfaceView`. This may be `null` if the `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedService` has not generated any content to be displayed within the calling app.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/adservices/ondevicepersonalization/SurfacePackageToken` | <br /> |