Stay organized with collections
Save and categorize content based on your preferences.
class AdId
A unique, user-resettable, device-wide, per-profile ID for advertising as returned by the AdIdManager#getAdId() API.
Ad networks may use {@code AdId} to monetize for Interest Based Advertising (IBA), i.e. targeting and remarketing ads. The user may limit availability of this identifier.
Summary
Public properties |
String |
The advertising ID.
|
Boolean |
the limit ad tracking enabled setting.
|
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-05-15 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-15 UTC."],[],[],null,["# AdId\n====\n\nArtifact: [androidx.privacysandbox.ads:ads-adservices](/jetpack/androidx/releases/privacysandbox-ads) \n[View Source](https://cs.android.com/search?q=file:androidx/privacysandbox/ads/adservices/adid/AdId.kt+class:androidx.privacysandbox.ads.adservices.adid.AdId) \nAdded in [1.0.0](/jetpack/androidx/releases/privacysandbox-ads#1.0.0)\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/androidx/privacysandbox/ads/adservices/adid/AdId \"View this page in Java\")\n\n\n```\nclass AdId\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA unique, user-resettable, device-wide, per-profile ID for advertising as returned by the AdIdManager#getAdId() API.\n\nAd networks may use {@code AdId} to monetize for Interest Based Advertising (IBA), i.e. targeting and remarketing ads. The user may limit availability of this identifier.\n\nSummary\n-------\n\n| ### Public functions |\n|-----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `open operator `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [equals](/reference/kotlin/androidx/privacysandbox/ads/adservices/adid/AdId#equals(kotlin.Any))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)` |\n| `open `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [hashCode](/reference/kotlin/androidx/privacysandbox/ads/adservices/adid/AdId#hashCode())`()` |\n| `open `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | [toString](/reference/kotlin/androidx/privacysandbox/ads/adservices/adid/AdId#toString())`()` |\n\n| ### Public properties |\n|-------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | [adId](/reference/kotlin/androidx/privacysandbox/ads/adservices/adid/AdId#adId()) The advertising ID. |\n| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [isLimitAdTrackingEnabled](/reference/kotlin/androidx/privacysandbox/ads/adservices/adid/AdId#isLimitAdTrackingEnabled()) the limit ad tracking enabled setting. |\n\nPublic functions\n----------------\n\n### equals\n\n```\nopen operator fun equals(other: Any?): Boolean\n``` \n\n### hashCode\n\n```\nopen fun hashCode(): Int\n``` \n\n### toString\n\n```\nopen fun toString(): String\n``` \n\nPublic properties\n-----------------\n\n### adId\n\nAdded in [1.0.0](/jetpack/androidx/releases/privacysandbox-ads#1.0.0) \n\n```\nval adId: String\n```\n\nThe advertising ID. \n\n### isLimitAdTrackingEnabled\n\nAdded in [1.0.0](/jetpack/androidx/releases/privacysandbox-ads#1.0.0) \n\n```\nval isLimitAdTrackingEnabled: Boolean\n```\n\nthe limit ad tracking enabled setting."]]