Flutter native ads - Show AdMob Native Ads use PlatformView

Overview

flutter_native_ads

version

Flutter plugin for AdMob Native Ads. Compatible with Android and iOS using PlatformView.

Android iOS
image image

Getting Started

Android

AdMob 17 requires the App ID to be included in the AndroidManifest.xml. Failure to do so will result in a crash on launch of your app. The line should look like:

<meta-data
    android:name="com.google.android.gms.ads.APPLICATION_ID"
    android:value="[ADMOB_APP_ID]"/>

where [ADMOB_APP_ID] is your App ID. You must pass the same value when you initialize the plugin in your Dart code.

iOS

Admob 7.42.0 requires the App ID to be included in Info.plist. Failure to do so will result in a crash on launch of your app. The lines should look like:

<key>GADApplicationIdentifier</key>
<string>[ADMOB_APP_ID]</string>

where [ADMOB_APP_ID] is your App ID. You must pass the same value when you initialize the plugin in your Dart code.

And PlatformView

<key>io.flutter.embedded_views_preview</key>
<true/>

Layout

This plugin supported custom layout. You need to create a layout file.

Android

You can use anything if the parent is a ViewGroup. The example uses ConstraintLayout.

Use com.google.android.gms.ads.formats.UnifiedNativeAdView for the parent.

image

Use com.google.android.gms.ads.formats.MediaView for MediaView.

image

  • xml
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.gms.ads.formats.UnifiedNativeAdView 
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/flutter_native_ad_unified_native_ad"
    ...
    
    <!-- ViewGroup -->
    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/relativeLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        
        ...

        <com.google.android.gms.ads.formats.MediaView
            android:id="@+id/flutter_native_ad_media"
            ...

example

iOS

Please set GADUnifiedNativeAdView for the parent.

image

Please set GADMediaView to MediaView.

image

Please set Restoration ID for View that displays attribution

image

example

Mapping Native Ads to Layout

Need to mapping the view

Android

Mapping by view id

View ID
UnifiedNativeAdView flutter_native_ad_unified_native_ad
Headline flutter_native_ad_headline
Body flutter_native_ad_body
Call To Action flutter_native_ad_call_to_action
Attribution flutter_native_ad_attribution
MediaView flutter_native_ad_media
Icon flutter_naitve_ad_icon
Star rating flutter_naitve_ad_star
Store flutter_naitve_ad_store
Price flutter_naitve_ad_price
Advertiser flutter_naitve_ad_advertiser

iOS

Mapping by Outlet

image

Usage

import 'package:flutter/material.dart';
import 'package:native_ads/native_ad_param.dart';
import 'package:native_ads/native_ad_view.dart';

import 'package:native_ads/native_ads.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  NativeAds.initialize();
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('NativeAds example app'),
        ),
        body: Center(
          child: ListView.separated(
            itemBuilder: (context, index) {
              if (index % 10 == 0) {
                return Padding(
                  padding: const EdgeInsets.all(8.0),
                  child: SizedBox(
                    width: double.infinity,
                    height: 320,
                    child: NativeAdView(
                      onParentViewCreated: (_) {
                      },
                      androidParam: AndroidParam()
                        ..placementId = "ca-app-pub-3940256099942544/2247696110" // test
                        ..packageName = "{{YOUR_ANDROID_APP_PACKAGE_NAME}}"
                        ..layoutName = "{{YOUR_CREATED_LAYOUT_FILE_NAME}}"
                        ..attributionText = "AD"
                        ..testDevices = ["{{YOUR_TEST_DEVICE_IDS}}"],
                      iosParam: IOSParam()
                        ..placementId = "ca-app-pub-3940256099942544/3986624511" // test
                        ..bundleId = "{{YOUR_IOS_APP_BUNDLE_ID}}"
                        ..layoutName = "{{YOUR_CREATED_LAYOUT_FILE_NAME}}"
                        ..attributionText = "SPONSORED"
                        ..testDevices = ["{{YOUR_TEST_DEVICE_IDS}}"],
                      onAdImpression: () => print("onAdImpression!!!"),
                      onAdClicked: () => print("onAdClicked!!!"),
                      onAdFailedToLoad: (Map<String, dynamic> error) => print("onAdFailedToLoad!!! $error"),
                    ),
                  ),
                );
              } else {
                return Padding(
                  padding: const EdgeInsets.all(8.0),
                  child: Text(
                    "this is text $index",
                    style: Theme.of(context).textTheme.body1,
                  ),
                );
              }
            },
            itemCount: 50,
            separatorBuilder: (context, _) => const Divider(),
          ),
        ),
      ),
    );
  }
}

Supported native ads fields

  • Headline(Required)
  • Body(Required)
  • Call To Action(Required)
  • Ad Attribution(Required)
  • Media
  • Icon
  • Star rating
  • Store
  • Price
  • Advertiser

Event callback

Receive callbacks for some events by passing to the NativeAdView constructor

  • onAdImpression
  • onAdClicked
  • onAdFailedToLoad
  • onAdLeftApplication
  • onAdLoaded

Reference

Limitations

This is just an initial version of the plugin. There are still some limitations:

Comments
  • bad access in iphone 6 while load second native in list

    bad access in iphone 6 while load second native in list

    if I load only first native then it's working fine but once load first then reload at index 11 its say bad error from Xcode also I have tested it on android and it's working fine

    opened by NavneetSi 8
  • Can't load Ads and event callback not showing anything (Android)

    Can't load Ads and event callback not showing anything (Android)

    Hi,

    I place native ads widget on my Home Screen and the structure like below:

    For Initialization:

    class HomeScreen extends StatefulWidget{
      @override
      _HomeScreenState createState() => _HomeScreenState();
    }
    
    class _HomeScreenState extends State<HomeScreen> with AfterLayoutMixin<HomeScreen> {
    
      @override
        void initState() {
          // TODO: implement initState
          super.initState();      
          NativeAds.initialize();
          ...
        }
    

    For NativeAds placement is under below structures:

    @override
    Widget build(BuildContext context) {
      return Stack(
        children: <Widget>[
          Scaffold(
            appBar: AppBar( .. ),
            body: OfflineBuilder(
                  connectivityBuilder: (BuildContext context, ConnectivityResult connectivity, Widget child) {
                      ...  
                      child: NestedScrollView(
                          headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) { ... }
                          body: RefreshIndicator(
                            backgroundColor: Pigment.fromString(UIData.primaryColor),
                            color: Colors.white,
                            onRefresh: () => homeBloc.init(),
                            child: ListView(
                              children: <Widget>[
                                Row(
                                ...
                                  ListView(
                                    physics: NeverScrollableScrollPhysics(),
                                    shrinkWrap: true,
                                    children: <Widget>[
                                     
                                    ...
    
                                      
                                    SizedBox(
                                      width: double.infinity,
                                      height: 320,
                                      child: NativeAdView(
                                        onParentViewCreated: (_) {
                                          print("sinative create.....");
                                        },
                                        androidParam: AndroidParam()
                                          ..placementId = "ca-app-pub-xxx" //my admob
                                          ..packageName = "com.apps.myapp"
                                          ..layoutName = "native_ad_layout"
                                          ..attributionText = "AD",
                                        iosParam: IOSParam()
                                          ..placementId = "ca-app-pub-3940256099942544/3986624511" // test
                                          ..bundleId = "{{YOUR_IOS_APP_BUNDLE_ID}}"
                                          ..layoutName = "{{YOUR_CREATED_LAYOUT_FILE_NAME}}"
                                          ..attributionText = "SPONSORED",
                                        onAdImpression: () => print("sinative_muncul"),
                                        onAdClicked: () => print("onAdClicked!!!"),
                                        onAdFailedToLoad: (Map<String, dynamic> error) => print("sinative_error ==> $error"),
                                      ),
                                    ),                      
                                    
                                    ...
    
                                    ...
    
    
    

    However, Native Ads wont load and show, also the event callback like onAdFailedToLoad does not return anything...

    any idea to solve ?

    Thank You in advance...

    opened by mestartlearncode 6
  • Layout is not visible on Release build

    Layout is not visible on Release build

    Shows container instead of layout,but debugging one is showing well. Created my own layouts and also tested your Example code,but nothing is showing in release mode

    opened by ghost 5
  • Ad failed to load on iOS, error 11, Request Error: Internal error

    Ad failed to load on iOS, error 11, Request Error: Internal error

    Its working on Android but failed to work on iOS repeatedly even with test ad unit. it gives the error message: error code: 11, Request Error: Internal error

    opened by Greatcallie 5
  • Can't load ad from Mac in android device if adding google service 4.2.0 in android build gradle

    Can't load ad from Mac in android device if adding google service 4.2.0 in android build gradle

    if I comment google-service:4.2.0 from android Gradle then its load success but if I uncomment then it's not loaded in Mac only, For windows also it's working fine

    Screenshot 2019-09-10 at 6 27 25 PM Screenshot 2019-09-10 at 6 27 39 PM

    but I need google service:4.2.0 at android level

    Screenshot 2019-09-10 at 5 58 51 PM Screenshot 2019-09-10 at 5 58 58 PM

    opened by NavneetSi 5
  • [ios] Unexpectedly found nil while implicitly unwrapping an Optional value

    [ios] Unexpectedly found nil while implicitly unwrapping an Optional value

    This error caused to app crash running on both emulator and real ios device with internet connection. App doesn’t crash without internet. It happens after ad request.

    nativeAd object isn’t nil.

    What was happened?

    Screen Shot 2020-07-02 at 15 32 53

    flutter doctor -v
    [✓] Flutter (Channel beta, 1.18.0-11.1.pre, on Mac OS X 10.15.4 19E287, locale
        en)
        • Flutter version 1.18.0-11.1.pre at /Users/fusarihan/dev/flutter
        • Framework revision 2738a1148b (7 weeks ago), 2020-05-13 15:24:36 -0700
        • Engine revision ef9215ceb2
        • Dart version 2.9.0 (build 2.9.0-8.2.beta)
    
     
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
        • Android SDK at /Users/fusarihan/Library/Android/sdk
        • Platform android-30, build-tools 30.0.0
        • Java binary at: /Applications/Android
          Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build
          1.8.0_242-release-1644-b3-6222593)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 11.5)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 11.5, Build version 11E608c
        • CocoaPods version 1.9.3
    
    [✓] Android Studio (version 4.0)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 47.0.2
        • Dart plugin version 193.7361
        • Java version OpenJDK Runtime Environment (build
          1.8.0_242-release-1644-b3-6222593)
    
    [✓] VS Code (version 1.46.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.12.1
    
    [✓] Connected device (1 available)
        • F • 1d3aa0502670fba6e59b70d4a46bcc67d4fa5c57 • ios • iOS 13.4.1
    
    • No issues found!
    
    opened by furkansarihan 3
  • App Crash after add native_ads: ^0.3.0 in pubspec.yaml while opening

    App Crash after add native_ads: ^0.3.0 in pubspec.yaml while opening

    I running my app well, no ads here, and then I add native_ads: ^0.3.0 in pubspec.yaml , run packages get ,and try rebuild my app to run. but it crash on opening , even not show the opening page.

    flutter doctor -v

    [✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.14.6 18G95, locale zh-Hans-CN) • Flutter version 1.9.1+hotfix.6 at /Volumes/Jianan/SDK/flutter • Framework revision 68587a0916 (3 months ago), 2019-09-13 19:46:58 -0700 • Engine revision b863200c37 • Dart version 2.5.0

    [!] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at /Volumes/Jianan/SDK/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 29.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

    [✓] Xcode - develop for iOS and macOS (Xcode 11.1) • Xcode at /Volumes/Jianan/APP/Xcode.app/Contents/Developer • Xcode 11.1, Build version 11A1027 • CocoaPods version 1.8.3

    [✓] Android Studio (version 3.5) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 42.0.1 • Dart plugin version 191.8593 • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

    [!] IntelliJ IDEA Ultimate Edition (version 2018.1.5) • IntelliJ at /Applications/IntelliJ IDEA.app ✗ Flutter plugin not installed; this adds Flutter specific functionality. ✗ Dart plugin not installed; this adds Dart specific functionality. • For information about installing plugins, see https://flutter.dev/intellij-setup/#installing-the-plugins

    [✓] Connected device (1 available) • Android SDK built for x86 • emulator-5554 • android-x86 • Android 7.0 (API 24) (emulator)

    ! Doctor found issues in 2 categories.

    opened by sunjianan9900 2
  • Apple will stop accepting submissions of apps that use UIWebView APIs.

    Apple will stop accepting submissions of apps that use UIWebView APIs.

    Getting the following message submitting our app to Apple App Store:

    ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs . After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to App Store Connect.

    This is a known issue with the ADMob iOS SDK: https://groups.google.com/forum/#!topic/google-admob-ads-sdk/QuZMbjIyxn8

    It looks like this has been resolved in the 7.50 SDK.

    opened by PlymouthRock 2
  • iOS Not all asset views lie inside the native ad view

    iOS Not all asset views lie inside the native ad view

    Ads are working on our iOS device. We are getting this error message in the debug log. Not sure if we are causing this or if it is from the plugin:

    Google:HTML Not all asset views lie inside the native ad view. This indicates an integration problem. Such implementations will not be supported in the future. Please make sure that all native ad assets are rendered inside the native ad view.

    opened by PlymouthRock 2
  • onAdFailedToLoad!!! {errorCode: 3}

    onAdFailedToLoad!!! {errorCode: 3}

    √ Built build\app\outputs\apk\debug\app-debug.apk. D/FlutterActivity(25192): Using the launch theme as normal theme. D/FlutterActivityAndFragmentDelegate(25192): Setting up FlutterEngine. D/FlutterActivityAndFragmentDelegate(25192): No preferred FlutterEngine was provided. Creating a new FlutterEngine for this FlutterFragment. D/FlutterActivityAndFragmentDelegate(25192): Attaching FlutterEngine to the Activity that owns this Fragment. D/FlutterView(25192): Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@60eba24 D/FlutterActivityAndFragmentDelegate(25192): Executing Dart entrypoint: main, and sending initial route: / Syncing files to device AOSP on IA Emulator... D/EGL_emulation(25192): eglMakeCurrent: 0xdf4051e0: ver 2 0 (tinfo 0xdf403660) I/utideas.diyjav(25192): The ClassLoaderContext is a special shared library. I/utideas.diyjav(25192): The ClassLoaderContext is a special shared library. D/eglCodecCommon(25192): setVertexArrayObject: set vao to 0 (0) 1 0 I/utideas.diyjav(25192): The ClassLoaderContext is a special shared library. I/DynamiteModule(25192): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:21200 I/DynamiteModule(25192): Selected remote version of com.google.android.gms.ads.dynamite, version >= 21200 D/DynamitePackage(25192): Instantiated singleton DynamitePackage. D/DynamitePackage(25192): Instantiating com.google.android.gms.ads.ChimeraMobileAdsSettingManagerCreatorImpl D/NetworkSecurityConfig(25192): No Network Security Config specified, using platform default I/WebViewFactory(25192): Loading com.android.chrome version 69.0.3497.100 (code 349710017) I/utideas.diyjav(25192): The ClassLoaderContext is a special shared library. I/cr_LibraryLoader(25192): Time to load native libraries: 32 ms (timestamps 3533-3565) E/cr_VariationsUtils(25192): Failed reading seed file "/data/user/0/com.tutideas.diyjava/app_webview/variations_seed": /data/user/0/com.tutideas.diyjava/app_webview/variations_seed (No such file or directory) I/chromium(25192): [INFO:library_loader_hooks.cc(36)] Chromium logging enabled: level = 0, default verbosity = 0 I/cr_LibraryLoader(25192): Expected native library version number "69.0.3497.100", actual native library version number "69.0.3497.100" W/cr_ChildProcLH(25192): Create a new ChildConnectionAllocator with package name = com.android.chrome, sandboxed = true I/cr_BrowserStartup(25192): Initializing chromium process, singleProcess=false I/utideas.diyjav(25192): Background concurrent copying GC freed 16356(1761KB) AllocSpace objects, 11(240KB) LOS objects, 49% free, 2MB/4MB, paused 6.787ms total 273.730ms W/utideas.diyjav(25192): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->(Landroid/content/Context;I)V (light greylist, reflection) W/utideas.diyjav(25192): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V (light greylist, reflection) W/utideas.diyjav(25192): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionStarted(I)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection) W/utideas.diyjav(25192): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(II)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection) W/utideas.diyjav(25192): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection) W/utideas.diyjav(25192): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextSelection;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection) W/utideas.diyjav(25192): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(III)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection) W/utideas.diyjav(25192): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection) W/cr_media(25192): Requires BLUETOOTH permission D/HostConnection(25192): HostConnection::get() New Host Connection established 0xdf423d10, tid 25265 D/HostConnection(25192): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_2 E/chromium(25192): [ERROR:gl_surface_egl.cc(335)] eglChooseConfig failed with error EGL_SUCCESS W/cr_CrashFileManager(25192): /data/user/0/com.tutideas.diyjava/cache/WebView/Crash Reports does not exist or is not a directory D/eglCodecCommon(25192): setVertexArrayObject: set vao to 0 (0) 0 0 D/EGL_emulation(25192): eglCreateContext: 0xdf407b80: maj 2 min 0 rcv 2 D/EGL_emulation(25192): eglMakeCurrent: 0xdf407b80: ver 2 0 (tinfo 0xc147f9b0) W/VideoCapabilities(25192): Unrecognized profile 4 for video/hevc I/VideoCapabilities(25192): Unsupported profile 4 for video/mp4v-es W/cr_MediaCodecUtil(25192): HW encoder for video/avc is not available on this device. E/chromium(25192): [ERROR:gl_surface_egl.cc(335)] eglChooseConfig failed with error EGL_SUCCESS D/eglCodecCommon(25192): setVertexArrayObject: set vao to 0 (0) 0 0 D/EGL_emulation(25192): eglCreateContext: 0xb749b960: maj 2 min 0 rcv 2 D/EGL_emulation(25192): eglMakeCurrent: 0xb749b960: ver 2 0 (tinfo 0xc147f9b0) D/eglCodecCommon(25192): setVertexArrayObject: set vao to 1 (1) 0 0 D/eglCodecCommon(25192): setVertexArrayObject: set vao to 2 (2) 0 0 D/eglCodecCommon(25192): setVertexArrayObject: set vao to 1 (1) 0 0 E/utideas.diyjav(25192): Invalid ID 0x00000000. E/MethodChannel#flutter/platform_views(25192): Failed to handle method call E/MethodChannel#flutter/platform_views(25192): android.content.res.Resources$NotFoundException: Resource ID #0x0 E/MethodChannel#flutter/platform_views(25192): at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:216) E/MethodChannel#flutter/platform_views(25192): at android.content.res.Resources.loadXmlResourceParser(Resources.java:2155) E/MethodChannel#flutter/platform_views(25192): at android.content.res.Resources.getLayout(Resources.java:1155) E/MethodChannel#flutter/platform_views(25192): at android.view.LayoutInflater.inflate(LayoutInflater.java:421) E/MethodChannel#flutter/platform_views(25192): at android.view.LayoutInflater.inflate(LayoutInflater.java:374) E/MethodChannel#flutter/platform_views(25192): at android.view.View.inflate(View.java:24354) E/MethodChannel#flutter/platform_views(25192): at sakebook.github.com.native_ads.UnifiedAdLayout.(UnifiedAdLayout.kt:22) E/MethodChannel#flutter/platform_views(25192): at sakebook.github.com.native_ads.UnifiedAdLayoutFactory.create(UnifiedAdLayoutFactory.kt:11) E/MethodChannel#flutter/platform_views(25192): at io.flutter.plugin.platform.SingleViewPresentation.onCreate(SingleViewPresentation.java:174) E/MethodChannel#flutter/platform_views(25192): at android.app.Dialog.dispatchOnCreate(Dialog.java:407) E/MethodChannel#flutter/platform_views(25192): at android.app.Dialog.show(Dialog.java:302) E/MethodChannel#flutter/platform_views(25192): at android.app.Presentation.show(Presentation.java:249) E/MethodChannel#flutter/platform_views(25192): at io.flutter.plugin.platform.VirtualDisplayController.(VirtualDisplayController.java:93) E/MethodChannel#flutter/platform_views(25192): at io.flutter.plugin.platform.VirtualDisplayController.create(VirtualDisplayController.java:53) E/MethodChannel#flutter/platform_views(25192): at io.flutter.plugin.platform.PlatformViewsController$1.createPlatformView(PlatformViewsController.java:105) E/MethodChannel#flutter/platform_views(25192): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:96) E/MethodChannel#flutter/platform_views(25192): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:60) E/MethodChannel#flutter/platform_views(25192): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:231) E/MethodChannel#flutter/platform_views(25192): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:93) E/MethodChannel#flutter/platform_views(25192): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:642) E/MethodChannel#flutter/platform_views(25192): at android.os.MessageQueue.nativePollOnce(Native Method) E/MethodChannel#flutter/platform_views(25192): at android.os.MessageQueue.next(MessageQueue.java:326) E/MethodChannel#flutter/platform_views(25192): at android.os.Looper.loop(Looper.java:160) E/MethodChannel#flutter/platform_views(25192): at android.app.ActivityThread.main(ActivityThread.java:6669) E/MethodChannel#flutter/platform_views(25192): at java.lang.reflect.Method.invoke(Native Method) E/MethodChannel#flutter/platform_views(25192): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) E/MethodChannel#flutter/platform_views(25192): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) E/flutter (25192): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, Resource ID #0x0, null) E/flutter (25192): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7) E/flutter (25192): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33) E/flutter (25192): E/flutter (25192): #2 AndroidViewController._create (package:flutter/src/services/platform_views.dart:640:54) E/flutter (25192): #3 AndroidViewController.setSize (package:flutter/src/services/platform_views.dart:557:14) E/flutter (25192): #4 RenderAndroidView._sizePlatformView (package:flutter/src/rendering/platform_view.dart:174:29) E/flutter (25192): #5 RenderAndroidView.performResize (package:flutter/src/rendering/platform_view.dart:155:5) E/flutter (25192): #6 RenderObject.layout (package:flutter/src/rendering/object.dart:1703:9) E/flutter (25192): #7 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13) E/flutter (25192): #8 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7) E/flutter (25192): #9 RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:259:13) E/flutter (25192): #10 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7) E/flutter (25192): #11 RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:206:11) E/flutter (25192): #12 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7) E/flutter (25192): #13 RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:744:15) E/flutter (25192): #14 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7) E/flutter (25192): #15 RenderPositionedBox.performLayout (package:flutter/src/rendering/shifted_box.dart:392:13) E/flutter (25192): #16 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7) E/flutter (25192): #17 MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:163:11) E/flutter (25192): #18 _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:477:7) E/flutter (25192): #19 MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:232:7) E/flutter (25192): #20 RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:391:14) E/flutter (25192): #21 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7) E/flutter (25192): #22 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13) E/flutter (25192): #23 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7) E/flutter (25192): #24 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13) E/flutter (25192): #25 _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1232:11) E/flutter (25192): #26 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7) E/flutter (25192): #27 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13) E/flutter (25192): #28 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7) E/flutter (25192): #29 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13) E/flutter (25192): #30 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7) E/flutter (25192): #31 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13) E/flutter (25192): #32 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7) E/flutter (25192): #33 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13) E/flutter (25192): #34 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7) E/flutter (25192): #35 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13) E/flutter (25192): #36 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7) E/flutter (25192): #37 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13) E/flutter (25192): #38 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7) E/flutter (25192): #39 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13) E/flutter (25192): #40 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7) E/flutter (25192): #41 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13) E/flutter (25192): #42 RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:3168:13) E/flutter (25192): #43 RenderObject.layout (package:flutt

    opened by AnhTu6610 1
  • Ad failed to load on Android, error 3, using test Ad

    Ad failed to load on Android, error 3, using test Ad

    I pull your project and run , it works but I copy the code to my project , it not show test ad, and got errorCode: 3 did I miss anything ?

    p.s firebase_admob test banner works...

    opened by sunjianan9900 1
  • Swift Compiler Error (Xcode): Cannot find type 'GADUnifiedNativeAd' in scope

    Swift Compiler Error (Xcode): Cannot find type 'GADUnifiedNativeAd' in scope

    I am using the latest flutter SDK but when I add your library into my project I found this error.

    error: cannot find type 'GADUnifiedNativeAdView' in scope let adView = nibObjects.first as? GADUnifiedNativeAdView else {

    opened by pavelsust 0
  • incompatibel with google_mobile_ads

    incompatibel with google_mobile_ads

    we can't user this plugin along side with the new google_mobile_ads Plugin from Flutter Team. when you use both plugin and try to run the app on device / emulator, the app doesn't start and there is lot of red line in log, saying that many classes are duplicates. can you please fix this. because the approach of your plugin to implement native ads is the best in my opinion

    opened by korchix 0
  • Hiding views in Unified Ad if not filled

    Hiding views in Unified Ad if not filled

    If using star rating and the ad does not have star rating set, it will remain visible with 0 starts. These views should be hidden if they are not filled.

    Something similar to this: image

    opened by juvanjan 0
  • How to Include adverts in between my videos in my flutter app, just like the way YouTube works.

    How to Include adverts in between my videos in my flutter app, just like the way YouTube works.

    I want to include admob adverts in between videos in a flutter app. I want it to work the way YouTube works where you get few adverts while watching a YouTube video. I want that same functionality in my app. Does anyone know how I can get that?

    opened by Irewoleo 2
Releases(0.5.0)
Owner
sakebook
Smartphone app developer
sakebook
Easy-to-make native ads in flutter using AdMOB SDK.

native_admob_flutter Easy-to-make ads in Flutter with Google's AdMob SDK. English | Português Get started To get started with Native Ads for Flutter,

Bruno D'Luka 81 Dec 12, 2022
Plugin to integrate native firebase admob to Flutter application

flutter_native_admob Plugin to integrate Firebase Native Admob to Flutter application Platform supported: iOS, Android Getting Started For help gettin

Duy Duong 63 Dec 21, 2022
Google mobile ads applovin - AppLovin mediation plugin for Google Mobile Ads (Flutter).

AppLovin mediation plugin for Google Mobile Ads Flutter Google Mobile Ads Flutter mediation plugin for AppLovin. Use this package as a library depende

Taeho Kim 1 Jul 5, 2022
Show a draggable floating chat icon button and show messages on screens

Show a draggable floating chat icon button and show messages on screens Features A widget for displaying a chat icon (or custom widget) on top of a ba

CU Apps 4 May 5, 2022
A Sample Flutter project to show how to integrate native kotlin code with flutter

kotlin_flashlight A Sample Flutter project to show how to integrate native kotlin code with flutter. Getting Started Visit this docs for Flutter setup

null 0 Apr 4, 2022
The @Flutter Plugin to show native toast on Android

Native Toast The Flutter Plugin to show native toast on Android. How it works? The native_toast plugin works on the basis of the Toast class. in Andro

Mihir Paldhikar 4 Jan 3, 2023
Demo Project to show how to use Phone Authentication in Flutter with Firebase backend

Firebase Phone Authentication using Firebase Demo Project to show how to do Phone Authentication in Flutter using Firebase backend. Screenshots At Fir

Kune Mohith 78 Sep 27, 2022
A package that gives us a modern way to show animated border as a placeholder while loading our widget with easy customization and ready to use.

A package that gives us a modern way to show animated border as a placeholder while loading our widget with easy customization and ready to use.

Mohit Chauhan 8 Oct 3, 2022
A Flutter App To Watch Anime Online With No Ads

Tako Play A Mobile App to Watch Anime With No ADS !! . Please Do not put Tako-Pl

Kaung Satt Hein 133 Dec 22, 2022
The lightweight and powerful wrapper library for Twitter Ads API written in Dart and Flutter 🐦

TODO: Put a short description of the package here that helps potential users know whether this package might be useful for them. Features TODO: List w

Twitter.dart 2 Aug 26, 2022
An easy way to add all google ads to your flutter app.

Google Ads An easy way to add all google ads to your flutter app. How to use it Add the google_mobile_ads package using flutter pub add google_mobile_

Yemeni Open Source 4 Sep 27, 2022
Mangato - An Android & IOS app to read manga on your phone without ads.

Mangato Read your favorite Japanese manga on Mangato including Attack on Titan, Fairy Tail, The Seven Deadly Sins, Fuuka, One Piece, and more. WARNING

Marouane 20 Nov 21, 2022
PsTube - Watch and download videos without ads

PsTube - Formerly FluTube Watch and download videos without ads Features Beautiful user interface Lightweight and fast No Login Required Keep your lik

Prateek Sunal 249 Dec 21, 2022
how to Integrating facebook audience network to flutter app for banner, interstitial, rewarded, native and native banner

fb_ads_flutter_12 A new Flutter project. Getting Started Watch the complite tutorial for integrating Facebook ads into the Flutter app in our Youtube

null 4 Nov 26, 2022
react-native native module for In App Purchase.

Documentation Published in website. Announcement Version 8.0.0 is currently in release candidate. The module is completely rewritten with Kotlin and S

dooboolab 2.3k Dec 31, 2022
dna, dart native access. A lightweight dart to native super channel plugin

dna, dart native access. A lightweight dart to native super channel plugin, You can use it to invoke any native code directly in contextual and chained dart code.

Assuner 14 Jul 11, 2022
A TabBarController that is easy to use for flutter developers. 🥰 It supports various styles of page navigation, and you can also use it to customize your favorite styles. 🍻🍻

easy_tab_controller A user-friendly TabBarController widget for flutter developer. Getting Started This project is a starting point for a Flutter plug

圆号本昊 3 May 26, 2022