Package-level declarations

Description

Contains

  • The 'Ad' composable

  • default build-in ad renderer for displaying native image ads

  • AdComposeRenderRegistry for registering custom renderers

Types

Link copied to clipboard

Compose ad render registry. Using this object we can register custom renderers.

Link copied to clipboard

Ad state of the advertisement.

Link copied to clipboard

The interface of the advertisement state.

Link copied to clipboard
object C

Properties

Link copied to clipboard

Gets the local ad state so it can be reused wherever it's needed without passing it through different objects.

Functions

Link copied to clipboard
fun Ad(adState: AdState, modifier: Modifier = Modifier)

Main Ad composable used to display the ad with provided adState.

Link copied to clipboard
fun compareAds(advertisement: Advertisement, adState: MutableState<AdState>): Boolean

Helper for fixing issue with updating adState and view if advertisement changes. It compares the first assets if it is different and return a boolean.

Link copied to clipboard
fun rememberAdState(advertisement: Advertisement, isBundleSavable: Boolean = true): AdState

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

fun rememberAdState(advertisementParameters: AdvertisementParameters, isBundleSavable: Boolean = true): AdState

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, isBundleSavable: Boolean = true): AdState
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, isBundleSavable: Boolean = true): AdState

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