setAdRequestGlobalParameter
fun <T> setAdRequestGlobalParameter(keyPath: KMutableProperty1<AdRequestGlobalParameters, T?>, value: T?)
A method for setting global parameters for AdRequest before calling the makeAdvertisement method.
Some parameters of AdRequest are designed to be passed in all requests, not just individual ones. To avoid duplicating code when creating AdRequest, SDK provide setAdRequestGlobalParameter method, which will modify these parameters:
// Set parameter
adService.setAdRequestGlobalParameter(
AdRequestGlobalParameters::externalUID,
ExternalUID("uid", true)
)
// Clear parameter
adService.removeAdRequestGlobalParameter(AdRequestGlobalParameters::externalUID)
Content copied to clipboard
A list of all global parameters can be found in the documentation for AdRequestGlobalParameters.
Parameters
keyPath
Represents a mutable parameter inside AdRequestGlobalParameters that should be set.
value
Value that should be set to the parameter.