Stay organized with collections
Save and categorize content based on your preferences.
AppSetIdManager
open class AppSetIdManager
AppSetIdManager provides APIs for app and ad-SDKs to access appSetId for non-monetizing purpose.
Summary
Public methods |
open static AppSetIdManager |
Factory method for creating an instance of AppSetIdManager.
|
open Unit |
Retrieve the AppSetId.
|
Public methods
get
open static fun get(context: Context): AppSetIdManager
Factory method for creating an instance of AppSetIdManager.
Parameters |
context |
Context: The Context to use This value cannot be null . |
getAppSetId
open fun getAppSetId(
executor: Executor,
callback: OutcomeReceiver<AppSetId!, Exception!>
): Unit
Retrieve the AppSetId.
Parameters |
executor |
Executor: The executor to run callback. This value cannot be null . Callback and listener events are dispatched through this Executor , providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use Context.getMainExecutor() . Otherwise, provide an Executor that dispatches to an appropriate thread. |
callback |
OutcomeReceiver<AppSetId!, Exception!>: The callback that's called after appsetid are available or an error occurs. This value cannot be null . |
Return |
Unit |
This value cannot 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-02-10 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-02-10 UTC."],[],[],null,["# AppSetIdManager\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 4](https://developer.android.com/sdkExtensions)\n\nAppSetIdManager\n===============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/adservices/appsetid/AppSetIdManager \"View this page in Java\") \n\n```\nopen class AppSetIdManager\n```\n\n|---|--------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.adservices.appsetid.AppSetIdManager](#) |\n\nAppSetIdManager provides APIs for app and ad-SDKs to access appSetId for non-monetizing purpose.\n\nSummary\n-------\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open static [AppSetIdManager](#) | [get](#get(android.content.Context))`(`context:` `[Context](../../content/Context.html#)`)` Factory method for creating an instance of AppSetIdManager. |\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [getAppSetId](#getAppSetId(java.util.concurrent.Executor,%20android.os.OutcomeReceiver))`(`executor:` `[Executor](../../../java/util/concurrent/Executor.html#)`, `callback:` `[OutcomeReceiver](../../os/OutcomeReceiver.html#)\u003c[AppSetId](/reference/kotlin/android/adservices/appsetid/AppSetId)!,` `[Exception](../../../java/lang/Exception.html#)!\u003e`)` Retrieve the AppSetId. |\n\nPublic methods\n--------------\n\n### get\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 6](https://developer.android.com/sdkExtensions) \n\n```\nopen static fun get(context: Context): AppSetIdManager\n```\n\nFactory method for creating an instance of AppSetIdManager.\n\n| Parameters ||\n|-----------|------------------------------------------------------------------------------------------------------------------------|\n| `context` | [Context](../../content/Context.html#): The [Context](../../content/Context.html#) to use This value cannot be `null`. |\n\n| Return ||\n|----------------------|--------------------------------------------------------------|\n| [AppSetIdManager](#) | A [AppSetIdManager](#) instance This value cannot be `null`. |\n\n### getAppSetId\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 4](https://developer.android.com/sdkExtensions) \n\n```\nopen fun getAppSetId(\n executor: Executor, \n callback: OutcomeReceiver\u003cAppSetId!, Exception!\u003e\n): Unit\n```\n\nRetrieve the AppSetId.\n\n| Parameters ||\n|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `executor` | [Executor](../../../java/util/concurrent/Executor.html#): The executor to run callback. This value cannot be `null`. Callback and listener events are dispatched through this [Executor](../../../java/util/concurrent/Executor.html#), providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use [Context.getMainExecutor()](../../content/Context.html#getMainExecutor()). Otherwise, provide an [Executor](../../../java/util/concurrent/Executor.html#) that dispatches to an appropriate thread. |\n| `callback` | [OutcomeReceiver](../../os/OutcomeReceiver.html#)\\\u003c[AppSetId](/reference/kotlin/android/adservices/appsetid/AppSetId)!, [Exception](../../../java/lang/Exception.html#)!\\\u003e: The callback that's called after appsetid are available or an error occurs. This value cannot be `null`. |\n\n| Return ||\n|------------------------------------------------------------------------------|------------------------------|\n| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | This value cannot be `null`. |"]]