AppSetId


open class AppSetId
kotlin.Any
   ↳ android.adservices.appsetid.AppSetId

A unique, per-device, per developer-account user-resettable ID for non-monetizing advertising usecases.

Represents the appSetID and scope of this appSetId from the android.adservices.appsetid.AppSetIdManager#getAppSetId(Executor,OutcomeReceiver) API. The scope of the ID can be per app or per developer account associated with the user. AppSetId is used for analytics, spam detection, frequency capping and fraud prevention use cases, on a given device, that one may need to correlate usage or actions across a set of apps owned by an organization.

Summary

Constants
static Int

The appSetId is scoped to an app.

static Int

The appSetId is scoped to a developer account on an app store.

Public constructors
AppSetId(appSetId: String, appSetIdScope: Int)

Creates an instance of AppSetId

Public methods
open Boolean
equals(other: Any?)

open String

Retrieves the appSetId.

open Int

Retrieves the scope of the appSetId.

open Int

Constants

SCOPE_APP

static val SCOPE_APP: Int

The appSetId is scoped to an app. All apps on a device will have a different appSetId.

Value: 1

SCOPE_DEVELOPER

static val SCOPE_DEVELOPER: Int

The appSetId is scoped to a developer account on an app store. All apps from the same developer on a device will have the same developer scoped appSetId.

Value: 2

Public constructors

AppSetId

AppSetId(
    appSetId: String,
    appSetIdScope: Int)

Creates an instance of AppSetId

Parameters
appSetId String: generated by the provider service. This value cannot be null.
appSetIdScope Int: scope of the appSetId. Value is android.adservices.appsetid.AppSetId#SCOPE_APP, or android.adservices.appsetid.AppSetId#SCOPE_DEVELOPER

Public methods

equals

Added in API level 34
open fun equals(other: Any?): Boolean
Parameters
obj the reference object with which to compare.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

getId

open fun getId(): String

Retrieves the appSetId. The api always returns a non-empty appSetId.

Return
String This value cannot be null.

getScope

open fun getScope(): Int

Retrieves the scope of the appSetId.

Return
Int Value is android.adservices.appsetid.AppSetId#SCOPE_APP, or android.adservices.appsetid.AppSetId#SCOPE_DEVELOPER

hashCode

Added in API level 34
open fun hashCode(): Int
Return
Int a hash code value for this object.