rememberAdState

fun rememberAdState(contentId: String, adTypes: List<String> = AdComposeRenderRegistry.getAllRendererNames(), wi: UInt? = null, timeoutAfterSeconds: UInt? = null, profiles: HashMap<String, String> = hashMapOf(), keywords: List<String> = listOf(), gdprPd: Boolean? = null, serverSideHeaderBidding: Boolean? = null, campaignId: String? = null, bannerId: String? = null, placementType: PlacementType = PlacementType.INLINE, dsa: DSA? = null, targetURLHandler: TargetURLHandlerInterface? = null): AdState

Remember the ad state and initialize Advertisement. Constructor for initializing in composable.

Return

Parameters

contentId

Advertisement content unit.

wi

Optional advertisement "window".

timeoutAfterSeconds

: Fail with AdError.TIMED_OUT if no response is received from the server within the given time. Default value is 10 seconds.

profiles

Key value pairs for targeting profile. Empty by default.

keywords

Key value pairs that help in serving matching ads

gdprPd

if you use profiles, you can optionally set gdprPd to 'true' to tell the AdServer that profiles

serverSideHeaderBidding

Optional option to enable server side header bidding. contains personal information about the user.


fun rememberAdState(learningTag: Map<String, String>, adTypes: List<String> = AdComposeRenderRegistry.getAllRendererNames(), wi: UInt? = null, timeoutAfterSeconds: UInt? = null, profiles: HashMap<String, String> = hashMapOf(), keywords: List<String> = listOf(), gdprPd: Boolean? = null, serverSideHeaderBidding: Boolean? = null, campaignId: String? = null, bannerId: String? = null, placementType: PlacementType = PlacementType.INLINE, dsa: DSA? = null, targetURLHandler: TargetURLHandlerInterface? = null): AdState

Remember the ad state and initialize Advertisement. Constructor for initializing in composable.

Return

Parameters

learningTag

Key-value pairs that are attached to content units. The main goal of learning tags is to support human-readable interfaces between the customer and content units.

wi

Optional advertisement "window".

timeoutAfterSeconds

: Fail with AdError.TIMED_OUT if no response is received from the server within the given time. Default value is 10 seconds.

profiles

Key value pairs for targeting profile. Empty by default.

keywords

Key value pairs that help in serving matching ads

gdprPd

if you use profiles, you can optionally set gdprPd to 'true' to tell the AdServer that profiles

serverSideHeaderBidding

Optional option to enable server side header bidding. contains personal information about the user.




Remember the ad state. This constructor can be used when Advertisement is initialized independently, for example in a ViewModel.

Return

Parameters

advertisement

Takes the initialized Advertisement.