Skip to main content
Version: SDK 5.0.x

Interface AdvertiserIdInfo

The result of reading an advertiser id can be one of three possibilities: * The advertiser id was successfully read * The user limited ad tracking and the OS enforces this (late 2021: Android 12, early 2022: all devices) * Reading the advertiser id failed

In the first case there will be an advertiser id available. In the second case, the id will be null and isLimitedAdTracking() will report true. In the last case the advertiser id will also be null, but ad tracking will not be reported as limited.

public interface AdvertiserIdInfo

Methods

getAdvertiserId

@Nullable
String getAdvertiserId()

Retrieve the advertiser id of the user or null if it could not be read (user limited tracking and the OS enforces it or an error occurred).

Returns

The advertiser id of the user or null.

isLimitedAdTracking

boolean isLimitedAdTracking()

Did the user limit ad tracking? This can also be reported as true while the advertiser id is available. In that case the OS does not enforce the limit yet.

Returns

Whether ad tracking is limited.