Advertising support in Codename One had quietly rotted. It was spread across three mechanisms that no longer work: the original com.codename1.ads and FullScreenAdService APIs built on the long-dead InnerActive and V-Serv networks, the decade-old google.adUnitId and mopubId banner build hints (MoPub is gone), and an AdMob cn1lib that was interstitial-only, built on iOS APIs Google has since removed, busy-polled, and had no consent flow. None of them supported rewarded, rewarded-interstitial, app-open, or native formats, GDPR consent, iOS App Tracking Transparency, server-side reward verification, or mediation.
What is Codename One? Codename One is an open-source framework for building native iOS, Android, desktop, and web apps from a single Java or Kotlin codebase. Learn more at codenameone.com.
PR #5169 replaces all of it with one pluggable, format-complete advertising subsystem in the core, plus modern reference providers that actually work!
One API, every format
The public API lives in com.codename1.ads. AdManager is the entry point, and there is a type per format: InterstitialAd, RewardedAd, RewardedInterstitialAd, AppOpenAd, BannerAd, and NativeAdLoader. Consent is handled by AdConsent (UMP plus iOS ATT), and AdConfig, AdRequest, and AdListener round out the surface. The whole thing is event-driven and every callback is marshaled onto the EDT, so you never touch ad SDK threading.











