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

# ExecuteResult

*** ** * ** ***

```
open class ExecuteResult
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.adservices.ondevicepersonalization.OnDevicePersonalizationManager.ExecuteResult](https://developer.android.com/reference/kotlin/android/adservices/ondevicepersonalization/OnDevicePersonalizationManager.ExecuteResult#) |

*** ** * ** ***

> [!CAUTION]
> **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 result of a call to `https://developer.android.com/reference/kotlin/android/adservices/ondevicepersonalization/OnDevicePersonalizationManager#execute(android.content.ComponentName,%20android.os.PersistableBundle,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver)`

## Summary

| Public methods ||
|---|---|
| open [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)? | `https://developer.android.com/reference/kotlin/android/adservices/ondevicepersonalization/OnDevicePersonalizationManager.ExecuteResult#getOutputData()()` Returns the output data that was returned by the `https://developer.android.com/reference/kotlin/android/adservices/ondevicepersonalization/IsolatedService`. |
| open [SurfacePackageToken](https://developer.android.com/reference/kotlin/android/adservices/ondevicepersonalization/SurfacePackageToken)? | `https://developer.android.com/reference/kotlin/android/adservices/ondevicepersonalization/OnDevicePersonalizationManager.ExecuteResult#getSurfacePackageToken()()` Returns a `https://developer.android.com/reference/kotlin/android/adservices/ondevicepersonalization/SurfacePackageToken`, which is an opaque reference to content that can be displayed in a `https://developer.android.com/reference/kotlin/android/view/SurfaceView.html#`. |

## Public methods

### getOutputData

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

```
open fun getOutputData(): ByteArray?
```

**Deprecated:** *Deprecated in Java.*

Returns the output data that was returned by the `https://developer.android.com/reference/kotlin/android/adservices/ondevicepersonalization/IsolatedService`. This will be non-null if the `https://developer.android.com/reference/kotlin/android/adservices/ondevicepersonalization/IsolatedService` returns any results to the caller, and the egress of data from the `https://developer.android.com/reference/kotlin/android/adservices/ondevicepersonalization/IsolatedService` to the specific calling app is allowed by policy as well as an allowlist.

### getSurfacePackageToken

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

```
open fun getSurfacePackageToken(): SurfacePackageToken?
```

**Deprecated:** *Deprecated in Java.*

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