Skip to content

AdSize.getInlineAdaptiveBannerAdSize not working #142

Description

@vanniktech

Using 1.1.0:

@Composable actual fun rememberBanner(adUnitId: String?): MutableState<BannerAdHandler> {
  val width = LocalWindowInfo.current.containerSize.width
  val adSize = AdSize.getInlineAdaptiveBannerAdSize(width = width, AdSize.AUTO_HEIGHT)

  return rememberBannerAd(
    adUnitId = adUnitId ?: AdUnitId.BANNER_DEFAULT,
    adSize = adSize,
  )
}

Nothing happens, also when I change AdSize.AUTO_HEIGHT with a fixed value like 100. So far the only AdSize I'm able to use is:

val adSize = AdSize(
  AdSize.FULL_WIDTH,
  AdSize.AUTO_HEIGHT,
)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions