Skip to content
pubscout

interactive_media_ads

0.3.0+18, released 8 weeks ago by labs.flutter.dev

Flutter plugin for the Interactive Media Ads SDKs on Android and iOS.

$ flutter pub add interactive_media_ads
Source repository

What it does

Integrates Google's Interactive Media Ads (IMA) SDK into Flutter apps to request VAST-compliant multimedia ads and manage their playback. It renders ads in a separate container layered over content video players like the video_player plugin.

AI-written summary of version 0.3.0+18, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to display VAST-compliant video ads in your mobile application.
  • You are using a video player package and want to monetize content via pre-roll, mid-roll, or post-roll ads.

Skip it when

  • You require background audio ads or Google Dynamic Ad Insertion methods, which are currently unsupported.
  • You only need standard mobile banner or interstitial display ads instead of video IMA ads.

Strengths

  • Direct integration with official Google IMA SDKs for Android and iOS.
  • Provides granular controls for ad events, requests, and playback managers.

Weaknesses

  • Requires manual platform-specific configuration such as Android Manifest permissions and Java library desugaring.
  • Background audio ads and Google Dynamic Ad Insertion are not supported.

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
1

Requires adding INTERNET and ACCESS_NETWORK_STATE permissions and enabling coreLibraryDesugaring in Android's build.gradle.kts.

final AdDisplayContainer _adDisplayContainer = AdDisplayContainer(
  onContainerAdded: (AdDisplayContainer container) {
    final AdsLoader adsLoader = AdsLoader(
      container: container,
      onAdsLoaded: (OnAdsLoadedData data) {
        data.manager.init(settings: AdsRenderingSettings(enablePreloading: true));
        data.manager.start();
      },
      onAdsLoadError: (AdsLoadErrorData data) {},
    );
    adsLoader.requestAds(AdsRequest(adTagUrl: 'YOUR_AD_TAG_URL'));
  },
);

Alternatives

Packages that do the same job and could replace interactive_media_ads.

  • google_mobile_ads

    If you want standard banner, interstitial, or rewarded ads rather than VAST-compliant IMA video stream ads.