Stay organized with collections
Save and categorize content based on your preferences.
PersistAdSelectionResultRequest
class PersistAdSelectionResultRequest
Represents a request containing the seller, the ad selection data id and data.
Instances of this class are created by SDKs to be provided as arguments to the android.adservices.adselection.AdSelectionManager#persistAdSelectionResult
methods in AdSelectionManager
.
Summary
Public methods
getAdSelectionId
fun getAdSelectionId(): Long
Deprecated: Use the getAdSelectionDataId()
instead, the underlying value is enforced to be the same.
Return |
Long |
an ad selection id. |
getAdSelectionResult
fun getAdSelectionResult(): ByteArray?
Return |
ByteArray? |
an ad selection result. This value may be null . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[],[],null,["# PersistAdSelectionResultRequest\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 10](https://developer.android.com/sdkExtensions)\n\nPersistAdSelectionResultRequest\n===============================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/adservices/adselection/PersistAdSelectionResultRequest \"View this page in Java\") \n\n```\nclass PersistAdSelectionResultRequest\n```\n\n|---|---------------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.adservices.adselection.PersistAdSelectionResultRequest](#) |\n\nRepresents a request containing the seller, the ad selection data id and data.\n\nInstances of this class are created by SDKs to be provided as arguments to the [android.adservices.adselection.AdSelectionManager#persistAdSelectionResult](/reference/kotlin/android/adservices/adselection/AdSelectionManager#persistAdSelectionResult(android.adservices.adselection.PersistAdSelectionResultRequest,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver)) methods in [AdSelectionManager](/reference/kotlin/android/adservices/adselection/AdSelectionManager).\n\nSummary\n-------\n\n| Nested classes ||\n|---|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | [Builder](/reference/kotlin/android/adservices/adselection/PersistAdSelectionResultRequest.Builder) Builder for [PersistAdSelectionResultRequest](#) objects. |\n\n| Public methods ||\n|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | [getAdSelectionDataId](#getAdSelectionDataId())`()` Returns the id that identifies the [android.adservices.adselection.AdSelectionManager#getAdSelectionData(android.adservices.adselection.GetAdSelectionDataRequest,java.util.concurrent.Executor,android.os.OutcomeReceiver)](/reference/kotlin/android/adservices/adselection/AdSelectionManager#getAdSelectionData(android.adservices.adselection.GetAdSelectionDataRequest,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver)) payload that generated this result. |\n| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | [getAdSelectionId](#getAdSelectionId())`()` \u003cbr /\u003e |\n| [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)? | [getAdSelectionResult](#getAdSelectionResult())`()` \u003cbr /\u003e |\n| [AdTechIdentifier](../common/AdTechIdentifier.html#)? | [getSeller](#getSeller())`()` \u003cbr /\u003e |\n\nPublic methods\n--------------\n\n### getAdSelectionDataId\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 12](https://developer.android.com/sdkExtensions) \n\n```\nfun getAdSelectionDataId(): Long\n```\n\nReturns the id that identifies the [android.adservices.adselection.AdSelectionManager#getAdSelectionData(android.adservices.adselection.GetAdSelectionDataRequest,java.util.concurrent.Executor,android.os.OutcomeReceiver)](/reference/kotlin/android/adservices/adselection/AdSelectionManager#getAdSelectionData(android.adservices.adselection.GetAdSelectionDataRequest,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver)) payload that generated this result. \n\n### getAdSelectionId\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 10](https://developer.android.com/sdkExtensions) \nDeprecated in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getAdSelectionId(): Long\n```\n\n**Deprecated:** *Use the [getAdSelectionDataId()](#getAdSelectionDataId()) instead, the underlying value is enforced to be the same.*\n\n| Return ||\n|------------------------------------------------------------------------------|---------------------|\n| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | an ad selection id. |\n\n### getAdSelectionResult\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 10](https://developer.android.com/sdkExtensions) \n\n```\nfun getAdSelectionResult(): ByteArray?\n```\n\n| Return ||\n|------------------------------------------------------------------------------------------|---------------------------------------------------|\n| [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)? | an ad selection result. This value may be `null`. |\n\n### getSeller\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 10](https://developer.android.com/sdkExtensions) \n\n```\nfun getSeller(): AdTechIdentifier?\n```\n\n| Return ||\n|-------------------------------------------------------|-------------------------------------|\n| [AdTechIdentifier](../common/AdTechIdentifier.html#)? | a seller. This value may be `null`. |"]]