NonceLoader

public final class NonceLoader


Programmatic Access Library that collects signals for publishers who do not use the IMA SDK. When these signals are included on an ad request, it allows their request to access programmatic demand. The user should create single instance of the NonceLoader and call loadNonceManager() for each ad request or stream creation request. Users can gain performance improvements by instantiating the NonceLoader on app load. Minimum Android API version supported is 19.

Summary

Public constructors

NonceLoader(
    @NonNull Context context,
    @NonNull ConsentSettings consentSettings
)

Construct a NonceLoader instance.

NonceLoader(
    @NonNull Context context,
    @NonNull ConsentSettings consentSettings,
    @NonNull GoogleAdManagerSettings googleAdManagerSettings
)

Construct a NonceLoader instance, providing Google Ad Manager settings.

Public methods

Task<NonceManager>

Generates a programmatic access nonce for a given NonceRequest.

void

Free any resources held by the PAL SDK.

Public constructors

NonceLoader

public NonceLoader(
    @NonNull Context context,
    @NonNull ConsentSettings consentSettings
)

Construct a NonceLoader instance.

NonceLoader

public NonceLoader(
    @NonNull Context context,
    @NonNull ConsentSettings consentSettings,
    @NonNull GoogleAdManagerSettings googleAdManagerSettings
)

Construct a NonceLoader instance, providing Google Ad Manager settings. This is only required if the settings for the Ad Manager network to which the nonce will be sent have been updated from the default. See GoogleAdManagerSettings for which settings can be updated.

Public methods

loadNonceManager

public Task<NonceManagerloadNonceManager(@Nullable NonceRequest request)

Generates a programmatic access nonce for a given NonceRequest. This method will utilize background threads to avoid blocking the user.

release

public void release()

Free any resources held by the PAL SDK.