Closed JasonPan closed 5 months ago
A slightly adjacent question - ideally, there would be no black border at all - I don't experience this directly with AdMob, but for some reason, with the AppLovin SDK, the width doesn't seem to fully stretch. Any ideas?
AppLovin sizes the height to 50px, but AdMob does 61px. Both views have the width set to the device's width, and I have enabled adaptive banners.
AppLovin:
AdMob:
Hey @alhiwatan / @thomasmso - thanks for the prompt work on that PR. I've pulled the latest code and the adaptive sizing works great for AdMob now! However, I did notice a small issue when the networks switch (I suppose the container still retains the adaptive height). For me, it's not a big deal but just thought I'd raise it here in case it's an easy fix
Also, re the ad background for the non-adaptive banner ads, I tried setting it as red to see the effect clearly - as you can see in the screenshot below, it changes the container's background, but not the black fill on the sides of the ad.
From a little more testing, I see actually there seems to be two causes
AppLovinBannerAd.setExtraParameter(bannerAdUnitId, "adaptive_banner", "true");
always enables the adaptive height (e.g. 61px for a 393px-width device), independent of whether the ad's network is AdMob or not. Is this something we can add into the SDK, or some way for the consumer of the SDK to configure this? (e.g. detect if the ad network is AdMob, then enable this adaptive banner flag). I assume though because of mediation, it needs to be done on a per-ad instance.Keen to hear your thoughts on both of these, not sure if I'm just not correctly using the SDK as intended
@JasonPan, thanks for checking this out quickly.
Our test ad has a black background on the sides, so this is expected. But a live one depends on the ad itself. You can use a transparent color for the background. Some ads may have a transparent background.
BannerAd.setBackgroundColor(adUnitId, '#00000000');
When you detect which network it is for in the middle of the session, the ad is already shown in the current implementation. But you should turn it off for a non-AdMob ad unit.
The AdMob test ads show you the same content for different sizes, but the actual ads have content that meets the specific size. Could you try this with live ads?
MAX Module Version
6.3.0
React Native Version
0.72.6
Device/Platform Info
iOS 17.3.1
Current Behavior
I am trying to set the background colour of the banner ad to be transparent (or another colour) instead of the default black colour. I have followed the docs here
However, it does not seem to be taking effect. How can I achieve this?
Expected Behavior
I want to set the background colour of the banner ad, if it does not stretch all the way across the phone's width. By default, it appears black.
How to Reproduce
Additional Info
No response