AppSetIdManager

public class AppSetIdManager
extends Object

java.lang.Object
   ↳ android.adservices.appsetid.AppSetIdManager


AppSetIdManager provides APIs for app and ad-SDKs to access appSetId for non-monetizing purpose.

Summary

Public methods

static AppSetIdManager get(Context context)

Factory method for creating an instance of AppSetIdManager.

void getAppSetId(Executor executor, OutcomeReceiver<AppSetIdException> callback)

Retrieve the AppSetId.

Inherited methods

Public methods

get

public static AppSetIdManager get (Context context)

Factory method for creating an instance of AppSetIdManager.

Parameters
context Context: The Context to use This value cannot be null.

Returns
AppSetIdManager A AppSetIdManager instance This value cannot be null.

getAppSetId

public void getAppSetId (Executor executor, 
                OutcomeReceiver<AppSetIdException> callback)

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: The callback that's called after appsetid are available or an error occurs. This value cannot be null.

Returns
void This value cannot be null.

Throws
IllegalStateException if this API is not available.