configure

abstract suspend fun configure(adResponse: String, adMetadata: AdMetadata): AdResult<Unit>

The method receives new data from the ad server to prepare and configure the AdRenderer.

This method will be called every time Advertisement manages to load advertisement data. In it you can process the data, and prepare the AdRenderer for display.

Note: As soon as this method completes its execution, the application will receive an Advertisement object, so you should complete all processes for preparing the renderer within this method.

Return

The result of the renderer configuration. If you need to return a custom error related to the renderer configuration, you can use AdError.CustomRendererError.

Parameters

adResponse

The full response from the server in the form of String, which you can decode to display the renderer.

adMetadata

The AdMetadata object that contains metadata about the Advertisement. You can change the properties of this object.