configure
Create and configure AdService with the passed parameters.
This method is the only correct way to create an AdService. It configure the AdService, sets global parameters, loads the initial cookies that will be used by the ad server to identify the user, and registers all standard renderers.
Note: If you want to prevent user tracking, you can use GlobalParameters.gdpr, GlobalParameters.isOptOutEnabled, or GlobalParameters.accessMode when passing the globalParameters. At the same time, if the app uses a CMP that follows TCF v2 format, GlobalParameters.gdpr can be set automatically.
Return
The result of the AdService configuration.
Parameters
The unique identifier of the ad network.
The CoroutineScope that defines the lifetime of AdService. All internal operations will be cancelled when this scope is cancelled. Typically, this should be a lifecycle-aware scope like viewModelScope, lifecycleScope, or a custom scope that's cancelled when the owner is destroyed.
Timeout for the cookie loading, in seconds. 10 seconds by default.
Cache size in MB. 100 MB by default.
Common GlobalParameters that will be used each time you create an AdRequest, TagRequest, and TrackingRequest. You can change them over time using AdService.setGlobalParameters and AdService.removeGlobalParameter.
AdRequestGlobalParameters that will be used each time you create an AdRequest. You can change them over time using AdService.setAdRequestGlobalParameters and AdService.removeAdRequestGlobalParameter.