A Flutter plugin that uses native platform views for banner ads

  ads, Plugin, plugin

Ironsource Flutter Mediation SDK

A Flutter plugin that uses native platform views (IOS & Android) to show IronSource banner and interstitial ads!

portfolio_view
portfolio_view

Getting Started 

Initialize the plugin (Android Only):

Android Installing

Manifest Permissions #

Add the following permissions to your AndroidManifest.xml file inside the manifest tag but outside the tag:

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Manifest Activities #

Add the following activities inside the tag in your AndroidManifest:

    <activity
                android:name="com.ironsource.sdk.controller.ControllerActivity"
                android:configChanges="orientation|screenSize"
                android:hardwareAccelerated="true" />
    <activity
                android:name="com.ironsource.sdk.controller.InterstitialActivity"
                android:configChanges="orientation|screenSize"
                android:hardwareAccelerated="true"
                android:theme="@android:style/Theme.Translucent" />
    <activity
                android:name="com.ironsource.sdk.controller.OpenUrlActivity"
                android:configChanges="orientation|screenSize"
                android:hardwareAccelerated="true"
                android:theme="@android:style/Theme.Translucent" />

Create object

    String testAppId =  "9b563ab5" ;
    InterstitialHelper interstitialHelper =  InterstitialHelper (testAppId);

Show Interstitial Ads

  • Show Interstitial Ad:
   //interstitial ready is can show?

   RaisedButton(onPressed: () {
              if (interstitialHelper.isShow()) {
                interstitialHelper.onShow();
              }

Interstitial Methods

*Methods InterstitialHelper

   //onPause interstitial just work Android

   interstitialHelper.onPause();

   //onResume interstitial just work Android

   interstitialHelper.onResume();

   //onDestroy interstitial

   interstitialHelper. onDestroy ();
   
   //isShow interstitial isShowing ?
   interstitialHelper.isShow();
 
   //onShow interstitial show 🙂
   interstitialHelper.onShow();

Show Banner Ad:

  IronSourceBanner(
      adSize: bannerSize,
      listener: (
        IronsourceAdEvent event, Map<String, dynamic> args) {
        handleEvent(event, args, 'Banner');
       },
     ),

Future Work

  • Implement for type of rewarded and offerwall ads.

Download Flutter plugin source code on GitHub

https://github.com/cnt-interactive/flutter-ironsource-mediation-sdk