7

Question

I'm researching how to integrate MoPub's Android and iOS native ads implementation over to Flutter. What data from the native ad received from MoPub in the onNativeLoad method below would need to be passed in order for Flutter to display properly?

Potential Solution

Based on MoPub's documentation for manual native ads integration (on Android) the ad data can be received and passed via an EventChannel in order to display in Flutter's UI. I'm not sure which information from the NativeAd object would need to be passed to Flutter.

 moPubNativeNetworkListener = new MoPubNative.MoPubNativeNetworkListener() {
     @Override
     public void onNativeLoad(final NativeAd nativeAd) {
         Log.d("MoPub", "Native ad has loaded.");
     }
     @Override
     public void onNativeFail(NativeErrorCode errorCode) {
         Log.d("MoPub", "Native ad failed to load with error: " + errorCode.toString());
     }
 };

Developer's usage of MoPub on Flutter would key as it allows access to the major ad networks and thus provides effective monetization.

AdamHurwitz
  • 9,758
  • 10
  • 72
  • 134
  • Did you ever figure out a solution? I've considering just building a mopub plugin, also partly cause of the lack of ad network plugins other than admob – Amin Mar 19 '21 at 21:55
  • I have stayed with Kotlin development so far @Amin. – AdamHurwitz Mar 23 '21 at 21:07

0 Answers0