ServiceLocator

data class ServiceLocator(val appContext: Context, val eventHandler: AdRendererEventHandler, val assetRepository: AssetRepository, val assetRequestService: AssetRequestService, val assetCache: AssetCache)

A service locator that stores all possible services or information for creating a renderer.

You can use this service locator when registering the renderer using the AdService.registerRenderer method. It can be used as a DI container for your renderer, allowing you to pass the necessary dependencies from it to the renderer.

adService.registerRenderer("my_custom_renderer_name") { serviceLocator ->
MyCustomRenderer(
appContext = serviceLocator.appContext,
eventHandler = serviceLocator.eventHandler,
assetRepository = serviceLocator.assetRepository
)
}

Constructors

Link copied to clipboard
constructor(appContext: Context, eventHandler: AdRendererEventHandler, assetRepository: AssetRepository, assetRequestService: AssetRequestService, assetCache: AssetCache)

Properties

Link copied to clipboard

Global information about an application environment.

Link copied to clipboard

Interface of the cache of advertising resources. In most cases, you will use assetRepository instead of this service directly.

Link copied to clipboard

A service for downloading and caching advertising resources.

Link copied to clipboard

A service for downloading advertising resources. In most cases, you will use assetRepository instead of this service directly.

Link copied to clipboard

The AdRendererEventHandler object for processing events related to advertising and user interaction with it.