Skip to content

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

Closed
memoriasIT opened this issue Apr 3, 2025 · 4 comments
Closed
Assignees
Labels
banner ad Issues related to Banner Ad platform-android Android applications specifically

Comments

@memoriasIT
Copy link

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.

Image

Steps to Reproduce

  1. Run the minimal example in android
  2. Go down the ListView
  3. Go up again

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
import 'dart:async';
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:google_mobile_ads/google_mobile_ads.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Fluid ad issue',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const FluidAdExample(),
    );
  }
}

class FluidAdExample extends StatefulWidget {
  const FluidAdExample({super.key});

  @override
  _FluidAdExampleState createState() => _FluidAdExampleState();
}

class _FluidAdExampleState extends State<FluidAdExample> {
  FluidAdManagerBannerAd? _fluidAd;
  bool _isLoaded = false;
  AdSize? _adSize;

  @override
  void didChangeDependencies() {
    super.didChangeDependencies();
    _loadAd();
  }

  void _loadAd() async {
    await _fluidAd?.dispose();
    setState(() {
      _fluidAd = null;
      _isLoaded = false;
    });

    _fluidAd = FluidAdManagerBannerAd(
      adUnitId: '/6499/example/APIDemo/Fluid',
      request: const AdManagerAdRequest(),
      listener: AdManagerBannerAdListener(
        onAdLoaded: (ad) async {
          final size = await (ad as FluidAdManagerBannerAd).getPlatformAdSize();
          setState(() {
            _isLoaded = true;
            _adSize = size;
          });
        },
        onAdFailedToLoad: (ad, error) async => ad.dispose(),
      ),
      // ignore: unawaited_futures
    )..load();
  }

  @override
  Widget build(BuildContext context) => Scaffold(
        appBar: AppBar(
          title: const Text('Fluid Ad bug minimal example'),
        ),
        body: ListView.builder(
          itemCount: 20,
          itemBuilder: (context, index) {
            if (index == 1 && _isLoaded) {
              const paddingWidth = 16 * 2;
              final phoneWidth = MediaQuery.sizeOf(context).width - paddingWidth;
              return FutureBuilder(
                // ignore: discarded_futures
                future: _fluidAd?.getPlatformAdSize(),
                builder: (context, snapshot) {
                  if (snapshot.hasData && snapshot.data != null) {
                    print('AdHeight: ${snapshot.data!.height}');
                    print('AdHeight in state ${_adSize?.height}');
                    return ConstrainedBox(
                      constraints: BoxConstraints(minHeight: snapshot.data!.height.toDouble()),
                      child: FluidAdWidget(
                        ad: _fluidAd!,
                        width: phoneWidth,
                      ),
                    );
                  }
                  return const SizedBox.shrink();
                },
              );
            }

            return SizedBox(
              height: 750,
              width: MediaQuery.sizeOf(context).width,
              child: const GridPaper(),
            );

            //return Container(
            //           color: Colors.red[100],
            //);
          },
        ),
      );

  @override
  void dispose() {
    unawaited(_fluidAd?.dispose());
    super.dispose();
  }
}

Logs
[  +17 ms] I/Ads     (15127): Updating ad debug logging enablement.
[   +7 ms] I/Ads     (15127): This request is sent from a test device.
[  +11 ms] D/GASS    (15127): Clearcut logging disabled
[   +7 ms] W/ziparchive(15127): Unable to open '/data/user/0/-/cache/1727730429792.dm': No such file or directory
[   +1 ms] D/zzawd   (15127): File /data/user/0/-/cache/1727730429792.dex not found. No need for deletion
[  +19 ms] D/GASS    (15127): Clearcut logging disabled
[   +7 ms] I/WebViewFactory(15127): Loading com.google.android.webview version 109.0.5414.123 (code 541412334)
[   +1 ms] W/ziparchive(15127): Unable to open
'/data/app/~~CB1Tz4-Y8xeH6aaB3YOWuw==/com.google.android.trichromelibrary_541412334-dMhVudY7B6sVP4MxBRXd8g==/TrichromeLibrary.dm': No
such file or directory
[        ] W/ziparchive(15127): Unable to open
'/data/app/~~CB1Tz4-Y8xeH6aaB3YOWuw==/com.google.android.trichromelibrary_541412334-dMhVudY7B6sVP4MxBRXd8g==/TrichromeLibrary.dm': No
such file or directory
[        ] W/-(15127): Entry not found
[        ] D/nativeloader(15127): Configuring classloader-namespace for other apk
/data/app/~~CB1Tz4-Y8xeH6aaB3YOWuw==/com.google.android.trichromelibrary_541412334-dMhVudY7B6sVP4MxBRXd8g==/TrichromeLibrary.apk.
target_sdk_version=33, uses_libraries=ALL,
library_path=/data/app/~~7e_-y1mOF3ON32aVQCJnpQ==/com.google.android.webview-YmZ_T6R1fWZ9_7rvztvE1g==/lib/arm64:/data/app/~~7e_-y1mOF3ON3
2aVQCJnpQ==/com.google.android.webview-YmZ_T6R1fWZ9_7rvztvE1g==/WebViewGoogle.apk!/lib/arm64-v8a:/data/app/~~CB1Tz4-Y8xeH6aaB3YOWuw==/com
.google.android.trichromelibrary_541412334-dMhVudY7B6sVP4MxBRXd8g==/TrichromeLibrary.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand
[   +3 ms] D/nativeloader(15127): Configuring classloader-namespace for other apk
/data/app/~~7e_-y1mOF3ON32aVQCJnpQ==/com.google.android.webview-YmZ_T6R1fWZ9_7rvztvE1g==/WebViewGoogle.apk. target_sdk_version=33,
uses_libraries=,
library_path=/data/app/~~7e_-y1mOF3ON32aVQCJnpQ==/com.google.android.webview-YmZ_T6R1fWZ9_7rvztvE1g==/lib/arm64:/data/app/~~7e_-y1mOF3ON3
2aVQCJnpQ==/com.google.android.webview-YmZ_T6R1fWZ9_7rvztvE1g==/WebViewGoogle.apk!/lib/arm64-v8a:/data/app/~~CB1Tz4-Y8xeH6aaB3YOWuw==/com
.google.android.trichromelibrary_541412334-dMhVudY7B6sVP4MxBRXd8g==/TrichromeLibrary.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand
[   +4 ms] W/bnr.development(15127): Accessing hidden method Landroid/os/Trace;->isTagEnabled(J)Z (unsupported, reflection, allowed)
[        ] W/bnr.development(15127): Accessing hidden method Landroid/os/Trace;->traceBegin(JLjava/lang/String;)V (unsupported,
reflection, allowed)
[        ] W/bnr.development(15127): Accessing hidden method Landroid/os/Trace;->traceEnd(J)V (unsupported, reflection, allowed)
[        ] W/bnr.development(15127): Accessing hidden method Landroid/os/Trace;->asyncTraceBegin(JLjava/lang/String;I)V (unsupported,
reflection, allowed)
[        ] W/bnr.development(15127): Accessing hidden method Landroid/os/Trace;->asyncTraceEnd(JLjava/lang/String;I)V (unsupported,
reflection, allowed)
[   +1 ms] I/cr_WVCFactoryProvider(15127): Loaded version=109.0.5414.123 minSdkVersion=29 isBundle=false multiprocess=true packageId=2
[   +4 ms] I/cr_VariationsUtils(15127): Failed reading seed file "/data/user/0/-/app_webview/variations_seed_new"
[        ] I/cr_VariationsUtils(15127): Failed reading seed file "/data/user/0/-/app_webview/variations_seed"
[   +1 ms] I/cr_LibraryLoader(15127): Successfully loaded native library
[        ] I/cr_CachingUmaRecorder(15127): Flushed 9 samples from 9 histograms.
[  +34 ms] W/Ads     (15127): Update ad debug logging enablement as false
[  +17 ms] The Flutter DevTools debugger and profiler on sdk gphone64 arm64 is available at:
           http://127.0.0.1:9100?uri=http://127.0.0.1:55189/4rbHOrJHuhg=/
[ +123 ms] D/CompatibilityChangeReporter(15127): Compat change id reported: 214741472; UID 10247; state: ENABLED
[        ] D/CompatibilityChangeReporter(15127): Compat change id reported: 171228096; UID 10247; state: ENABLED
[  +11 ms] D/AutofillManager(15127): Fill dialog is enabled:false, hints=[password, passwordAuto, creditCardNumber,
creditCardSecurityCode, creditCardExpirationDate]
[  +10 ms] W/bnr.development(15127): Accessing hidden method Landroid/media/AudioManager;->getOutputLatency(I)I (unsupported, reflection,
allowed)
[   +1 ms] W/cr_media(15127): BLUETOOTH_CONNECT permission is missing.
[   +1 ms] W/cr_media(15127): registerBluetoothIntentsIfNeeded: Requires BLUETOOTH permission
[  +17 ms] D/HostConnection(15127): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2
ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1
ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings
ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles
ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8
ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data
ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma ANDROID_EMU_hwc_multi_configs GL_OES_EGL_image_external_essl3
GL_OES_vertex_array_object ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0 
[   +2 ms] D/EGL_emulation(15127): eglCreateContext: 0xb400006f25969c10: maj 3 min 0 rcv 3
[        ] D/EGL_emulation(15127): eglMakeCurrent: 0xb400006f25969c10: ver 3 0 (tinfo 0x7145df8280) (first time)
[  +10 ms] D/EGL_emulation(15127): eglCreateContext: 0xb400006f25969c10: maj 3 min 0 rcv 3
[  +30 ms] D/EGL_emulation(15127): eglCreateContext: 0xb400006f2596a450: maj 3 min 0 rcv 3
[ +107 ms] I/FA      (15127): Tag Manager is not found and thus will not be used
[  +24 ms] I/Ads     (15127): JS: The jsLoaded GMSG has been sent
(https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/production/sdk-core-v40-impl.html:915)
[        ] I/chromium(15127): [INFO:CONSOLE(915)] "The jsLoaded GMSG has been sent", source:
https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/production/sdk-core-v40-impl.html (915)
[   +4 ms] D/EGL_emulation(15127): eglCreateContext: 0xb400006f2596da50: maj 3 min 0 rcv 3
[  +27 ms] D/EGL_emulation(15127): eglCreateContext: 0xb400006f2596bad0: maj 3 min 0 rcv 3
[  +23 ms] D/TrafficStats(15127): tagSocket(295) with statsTag=0x6c, statsUid=-1
[  +46 ms] D/CompatibilityChangeReporter(15127): Compat change id reported: 210923482; UID 10247; state: ENABLED
[  +27 ms] D/TrafficStats(15127): tagSocket(302) with statsTag=0xffffffff, statsUid=-1
[   +9 ms] I/Ads     (15127): JS: The jsLoaded GMSG has been sent
(https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/production/sdk-core-v40-impl.html:915)
[        ] I/chromium(15127): [INFO:CONSOLE(915)] "The jsLoaded GMSG has been sent", source:
https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/production/sdk-core-v40-impl.html (915)
[   +5 ms] I/flutter (15127): AdHeight: 50
[   +1 ms] I/flutter (15127): AdHeight in state 50
[   +8 ms] I/PlatformViewsController(15127): Hosting view in view hierarchy for platform view: 0
[        ] I/PlatformViewsController(15127): PlatformView is using SurfaceProducer backend
[   +1 ms] W/Parcel  (15127): Expecting binder but got null!
[   +2 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
[ +243 ms] D/TrafficStats(15127): tagSocket(320) with statsTag=0x7f, statsUid=-1
[+4178 ms] D/ProfileInstaller(15127): Installing profile for -
[+86862 ms] D/EGL_emulation(15127): app_time_stats: avg=17601.93ms min=11.26ms max=140229.95ms count=8
[   +2 ms] D/EGL_emulation(15127): app_time_stats: avg=23465.41ms min=9.02ms max=140217.17ms count=6
[  +89 ms] I/bnr.development(15127): Compiler allocated 4413KB to compile void android.view.ViewRootImpl.performTraversals()
[  +29 ms] W/Parcel  (15127): Expecting binder but got null!
[  +24 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
[  +25 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
[   +6 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
[  +12 ms] D/TrafficStats(15127): tagSocket(146) with statsTag=0xffffffff, statsUid=-1
[  +11 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
...
[  +16 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
[  +26 ms] D/EGL_emulation(15127): app_time_stats: avg=23.46ms min=1.11ms max=468.92ms count=32
[   +1 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
[   +1 ms] D/EGL_emulation(15127): app_time_stats: avg=37.30ms min=7.22ms max=517.56ms count=27
[   +5 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
...
[  +17 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
[        ] D/EGL_emulation(15127): app_time_stats: avg=34.66ms min=6.20ms max=517.30ms count=30
[  +14 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
[  +18 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
[  +66 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
[+2105 ms] D/EGL_emulation(15127): app_time_stats: avg=138.93ms min=4.06ms max=2090.67ms count=17
[  +14 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
[        ] D/EGL_emulation(15127): app_time_stats: avg=554.75ms min=14.45ms max=2119.61ms count=4
[   +3 ms] D/EGL_emulation(15127): app_time_stats: avg=169.50ms min=7.10ms max=2121.87ms count=14
[   +9 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
...
[  +18 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
[  +15 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
[ +733 ms] D/EGL_emulation(15127): app_time_stats: avg=16.84ms min=12.24ms max=32.90ms count=60
[+1017 ms] D/EGL_emulation(15127): app_time_stats: avg=27.46ms min=14.96ms max=318.46ms count=37
[+1015 ms] D/EGL_emulation(15127): app_time_stats: avg=25.36ms min=14.95ms max=283.61ms count=40
[+1000 ms] D/EGL_emulation(15127): app_time_stats: avg=26.32ms min=14.49ms max=200.30ms count=38
[ +698 ms] I/flutter (15127): AdHeight: 50
[        ] I/flutter (15127): AdHeight in state 50
[   +2 ms] I/PlatformViewsController(15127): Hosting view in view hierarchy for platform view: 1
[        ] I/PlatformViewsController(15127): PlatformView is using SurfaceProducer backend
[   +2 ms] W/Parcel  (15127): Expecting binder but got null!
[   +3 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
[  +12 ms] D/EGL_emulation(15127): app_time_stats: avg=115.40ms min=11.88ms max=4070.79ms count=41
[ +317 ms] D/EGL_emulation(15127): app_time_stats: avg=39.89ms min=14.83ms max=318.40ms count=26
[ +161 ms] W/Parcel  (15127): Expecting binder but got null!
[   +9 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
[  +13 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
...
[ +367 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
[        ] D/EGL_emulation(15127): app_time_stats: avg=50.01ms min=12.59ms max=366.80ms count=20
[  +14 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
...
[  +18 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
[  +12 ms] D/EGL_emulation(15127): app_time_stats: avg=24.04ms min=13.11ms max=335.69ms count=42
[ +293 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
[        ] D/EGL_emulation(15127): app_time_stats: avg=37.57ms min=10.96ms max=367.00ms count=30
[  +12 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
[  +12 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.
....
[  +15 ms] E/FrameEvents(15127): updateAcquireFence: Did not find frame.

Flutter analyze:

Analyzing redacted...                                                
No issues found! (ran in 2.9s)

Flutter doctor output:

[✓] Flutter (Channel stable, 3.27.4, on macOS 15.0.1 24A348 darwin-arm64, locale en-US)
    • Flutter version 3.27.4 on channel stable at /Users/-/fvm/versions/3.27.4
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d8a9f9a52e (9 weeks ago), 2025-01-31 16:07:18 -0500
    • Engine revision 82bd5b7209
    • Dart version 3.6.2
    • DevTools version 2.40.3

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.1)
    • Android SDK at /Users/-/android-sdk
    • Platform android-35, build-tools 35.0.1
    • ANDROID_SDK_ROOT = /Users/-/android-sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 21.0.5+-13047016-b750.29)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16B40
    • CocoaPods version 1.16.2
@memoriasIT
Copy link
Author

memoriasIT commented Apr 3, 2025

I did export the request url, but I had to redact certain things. I can provide a full URL privately.
The format is however visible, and it says 320x50 which is not correct I would say

Ad request URL
https://pubads.g.doubleclick.net/gampad/ads?submodel=sdk_gphone64_arm64&adid_p=REDACTED&format=320x50_mb&omid_v=a.1.5.2-google_20241009&client_purpose_one=true&dv=231004600&gl=REDACTED&hl=REDACTED&js=afma-sdk-a-v244410000.244410000.0&lv=244410203&ms=REDACTED&carrier=REDACTED&request_pkg=REDACTED&request_agent=Flutter-GMA-5.3.1&fbs_aeid=REDACTED&fbs_aiid=REDACTED&seq_num=REDACTED&eid=318500618%2C318486317%2C318491267%2C318483611%2C318484496%2C318508195%2C318519883&gdpr=REDACTED&gdpr_consent=REDACTED&addtl_consent=REDACTED&guci=0.0.0.0.0.0.0.0&adtest=on&sdk_apis=7%2C8&omid_p=Google%2Fafma-sdk-a-v244410000.244410000.0&cap=m&u_w=412&u_h=708&msid=REDACTED&an=REDACTED&dvoln=0.5&u_audio=4&net=wi&u_so=p&loeid=44766145&preqs_in_session=0&preqs=REDACTED&time_in_session=REDACTED&sst=1743676440000&output=html&region=mobile_app&u_tz=REDACTED&url=REDACTED&gdfp_req=1&m_ast=afmajs&impl=ifr&iu=%2F6499%2Fexample%2FAPIDemo%2FFluid&sz=320x50&correlator=REDACTED&gsb=wi&apm_app_id=REDACTED&gmp_app_id=REDACTED&apm_app_type=1&lite=0&app_wp_code=REDACTED&app_code=REDACTED&stbg=1&caps=inlineVideo_interactiveVideo_mraid1_mraid2_mraid3_sdkVideo_exo3_th_autoplay_mediation_scroll_av_transparentBackground_sdkAdmobApiForAds_di_sfv_dinm_dim_nav_navc_dinmo_ipdof_gls_saiMacro_sai_xSeconds&bisch=false&blev=1&canm=false&mv=1801.com.android.vending&heap_free=REDACTED&heap_max=REDACTED&heap_total=REDACTED&wv_count=0&rdps=3600&cust_params=REDACTED&eo_idl=REDACTED&eo_id_tsl=REDACTED&is_lat=false&rdidl=REDACTED&idtypel=4&attokl=496&blob=REDACTED&adk=REDACTED&jsv=sdk_20190107_RC02-production-sdk_20250327_RC00

EDIT:
I checked the iOS request, it seems like it uses 320x50 too, so I am not sure, maybe that's fine?

https://pubads.g.doubleclick.net/gampad/ads?u_w=402&os_version=18.1.0&ms=11&u_so=p&omid_v=1.5.2-google_20241009&submodel=arm64&request_agent=Flutter-GMA-5.3.1&fluid=height&format=320x50

@memoriasIT memoriasIT changed the title Fluid banner getPlatformAdSize() return wrong height (android only) Fluid banner getPlatformAdSize() returns wrong height (android only) Apr 3, 2025
@malandr2
Copy link
Collaborator

malandr2 commented Apr 4, 2025

Hi @memoriasIT, thanks for sharing a reproducible example. I can see that the ad ad size is showing 320x50 when it's not. Even though this only happens on Android, my initial thought is this is still a Flutter. I've shared with this @LTPhantom to confirm.

@malandr2 malandr2 added platform-android Android applications specifically banner ad Issues related to Banner Ad labels Apr 4, 2025
@memoriasIT
Copy link
Author

Sorry to push a bit, but this is blocking a release in a client's app. Is there any possible workarounds?

@malandr2
Copy link
Collaborator

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!

@malandr2 malandr2 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
banner ad Issues related to Banner Ad platform-android Android applications specifically
Projects
None yet
Development

No branches or pull requests

3 participants