NonceLoader

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(context: Context, consentSettings: ConsentSettings)

Construct a NonceLoader instance.

NonceLoader(
    context: Context,
    consentSettings: ConsentSettings,
    googleAdManagerSettings: GoogleAdManagerSettings
)

Construct a NonceLoader instance, providing Google Ad Manager settings.

Public functions

Task<NonceManager!>!

Generates a programmatic access nonce for a given NonceRequest.

Unit

Free any resources held by the PAL SDK.

Public constructors

NonceLoader

NonceLoader(context: Context, consentSettings: ConsentSettings)

Construct a NonceLoader instance.

NonceLoader

NonceLoader(
    context: Context,
    consentSettings: ConsentSettings,
    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 functions

loadNonceManager

fun loadNonceManager(request: NonceRequest?): Task<NonceManager!>!

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

release

fun release(): Unit

Free any resources held by the PAL SDK.