-
Notifications
You must be signed in to change notification settings - Fork 312
Fluid banner getPlatformAdSize() returns wrong height (android only) #1293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I did export the request url, but I had to redact certain things. I can provide a full URL privately. EDIT: |
Hi @memoriasIT, thanks for sharing a reproducible example. I can see that the ad ad size is showing |
Sorry to push a bit, but this is blocking a release in a client's app. Is there any possible workarounds? |
Hi @memoriasIT, we've confirmed the root of this problem is actually an Android issue, and not something the google_mobile_ads flutter plugin can resolve. We've determined that when the ad size is fluid the Android SDK the AdSize.BANNER width and height. To improve this functionality for your use case, please create a new thread in the AdMob developers forum to begin the troubleshooting process. At this time the flutter plugin just returns the Android SDK's value. Workaround for ASAP would be not to use a fluidSize ad. Closing this out. Thanks! |
Hello!
First of all, congratulations on managing the issues, it's impressive how you guys manage to deal with so many and efficiently :)
This is basically issue #1228 but the guy did not specify any logs, so the issue got closed.
[REQUIRED] Step 1: Describe your environment
Flutter 3.27.4 on MacOS silicon. Iphone 18.2 simulator and android 35 emulator.
Flutter doctor output bellow.
Plugin Version
sha256:
"0d4a3744b5e8ed1b8be6a1b452d309f811688855a497c6113fc4400f922db603"
version:
"5.3.1"
[REQUIRED] Step 2: Describe the problem
The
bannerAd.getPlatformAdSize()
for a Fluid banner ad will not return the real value only on android.In the screenshot I provided bellow you can see on the left the iPhone and its logs. They return 338/342, but on the right you see that always 50 is returned.
The fluid ad is not always shown "cut off", sometimes it will be drawn fine (specially on the first build) but when placed in a ListView and re-built the size is 80% of the time not right.
Steps to Reproduce
Expected results:
The value of getPlatformAdSize() is correct and the ad is rendered fine.
Actual results:
The value of getPlatformAdSize() is both 50 (incorrect) in the onAdLoaded callback and when called with a future builder.
Screen.Recording.2025-04-03.at.12.18.31.mov
Logs
Flutter analyze:
Flutter doctor output:
The text was updated successfully, but these errors were encountered: