Stay organized with collections
Save and categorize content based on your preferences.
GetAdSelectionDataOutcome
class GetAdSelectionDataOutcome
Represents ad selection data collected from device for ad selection.
Summary
Public methods |
ByteArray? |
Returns the adSelectionData that is collected from device.
|
Long |
Returns the id that uniquely identifies this GetAdSelectionData payload.
|
Long |
Returns the adSelectionId that identifies the AdSelection.
|
Public methods
getAdSelectionData
fun getAdSelectionData(): ByteArray?
Returns the adSelectionData that is collected from device.
getAdSelectionDataId
fun getAdSelectionDataId(): Long
Returns the id that uniquely identifies this GetAdSelectionData payload.
getAdSelectionId
fun getAdSelectionId(): Long
Deprecated: Use the getAdSelectionDataId()
instead.
Returns the adSelectionId that identifies the AdSelection.
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,["# GetAdSelectionDataOutcome\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\nGetAdSelectionDataOutcome\n=========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/adservices/adselection/GetAdSelectionDataOutcome \"View this page in Java\") \n\n```\nclass GetAdSelectionDataOutcome\n```\n\n|---|---------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.adservices.adselection.GetAdSelectionDataOutcome](#) |\n\nRepresents ad selection data collected from device for ad selection.\n\nSummary\n-------\n\n| Public methods ||\n|------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|\n| [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)? | [getAdSelectionData](#getAdSelectionData())`()` Returns the adSelectionData that is collected from device. |\n| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | [getAdSelectionDataId](#getAdSelectionDataId())`()` Returns the id that uniquely identifies this GetAdSelectionData payload. |\n| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | [getAdSelectionId](#getAdSelectionId())`()` Returns the adSelectionId that identifies the AdSelection. |\n\nPublic methods\n--------------\n\n### getAdSelectionData\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 getAdSelectionData(): ByteArray?\n```\n\nReturns the adSelectionData that is collected from device.\n\n| Return ||\n|------------------------------------------------------------------------------------------|---------------------------|\n| [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)? | This value may be `null`. |\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 uniquely identifies this GetAdSelectionData payload. \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.*\n\nReturns the adSelectionId that identifies the AdSelection."]]