Skip to content

fix: AdLoaderAd dropping custom targeting on next-gen Android SDK - #4

Open
felipefuzaro-funda wants to merge 2 commits into
msbit:v9.0.0-ad-loader-adfrom
felipefuzaro-funda:fix/v9.0.0-ad-loader-ad
Open

fix: AdLoaderAd dropping custom targeting on next-gen Android SDK#4
felipefuzaro-funda wants to merge 2 commits into
msbit:v9.0.0-ad-loader-adfrom
felipefuzaro-funda:fix/v9.0.0-ad-loader-ad

Conversation

@felipefuzaro-funda

@felipefuzaro-funda felipefuzaro-funda commented Sep 1, 2026

Copy link
Copy Markdown

Problem

On the next-gen Android SDK (USE_NEXT_GEN_SDK=true, ads-mobile-sdk:1.1.1),
AdLoaderAd requests were built without applying the ad request, so custom
targeting, keywords, content URL, neighboring URLs, request agent, and PPID were
dropped. Targeted line items didn't match → No fill. Legacy play-services
and iOS were unaffected.

Fix

  • FlutterAdRequest (next-gen): add configureNativeAdRequestBuilder(...) to
    apply common request fields to NativeAdRequest.Builder.
  • FlutterAdManagerAdRequest (next-gen): override to also apply custom
    targeting, targeting lists, and PPID.
  • FlutterAdLoader (next-gen): thread the request into
    loadAdLoaderAd/loadAdManagerAdLoaderAd and apply it before load.
  • FlutterAdLoaderAd (next-gen): pass the request through in load().
  • AdMessageCodec: guard null domain/message when decoding
    LoadAdError/AdError (previously threw and masked the No-fill as a crash).

Tests

  • Added regression tests for null domain/message decoding.
  • flutter analyze clean; full Dart suite passes; example app compiles with
    --dart-define=USE_NEXT_GEN_SDK=true.

Notes

  • iOS already applies targeting via asGAMRequest:; no change needed.
  • Network/mediation extras intentionally omitted from the AdLoader path.

@felipefuzaro-funda felipefuzaro-funda changed the title fix: AdLoaderAd dropping custom targeting on next-gen Android fix: AdLoaderAd dropping custom targeting on next-gen Android SDK Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant