GithubHelp home page GithubHelp logo

Comments (11)

bdlukaa avatar bdlukaa commented on July 17, 2024

Sorry, but what's the issue here?

from native_admob_flutter.

kimmy-wang avatar kimmy-wang commented on July 17, 2024

Sorry, but what's the issue here?

After entering the splash page, the ad is automatically displayed, and another page is loaded after a period of time.

from native_admob_flutter.

bdlukaa avatar bdlukaa commented on July 17, 2024

Can you elaborate it? Do you want to display the ad continuously and repeatedly until the splash screen is completed?

from native_admob_flutter.

kimmy-wang avatar kimmy-wang commented on July 17, 2024

I have solved this problem, but found a new problem. At some point, no event was triggered after the ad was displayed.

appOpenAd.onEvent.listen((e) {
      final event = e.keys.first;
      // final info = e.values.first;
      switch (event) {
        case FullScreenAdEvent.loading:
          print('loading');
          break;
        case FullScreenAdEvent.loadFailed:
          print('load failed');
          break;
        case FullScreenAdEvent.loaded:
          _loaded = true;
          print('loaded');
          break;
        case FullScreenAdEvent.showed:
          _showed = true;
          print('ad showed');
          break;
        case FullScreenAdEvent.showFailed:
          print('show failed');
          break;
        case FullScreenAdEvent.closed:
          print('ad closed');
          break;
        default:
          print('default');
          break;
      }
    });

from native_admob_flutter.

bdlukaa avatar bdlukaa commented on July 17, 2024

In what platforms are you seeing this error?

from native_admob_flutter.

kimmy-wang avatar kimmy-wang commented on July 17, 2024

iOS

from native_admob_flutter.

gustavomrfz avatar gustavomrfz commented on July 17, 2024

Same issue just when the app started and try to show first Nativebanner. In emulators and physical Redmi Note 7 works fine, but fails in a Motorola XT1580 (API 26).

D/DynamitePackage(20134): Instantiating com.google.android.gms.ads.ChimeraNativeAdViewDelegateCreatorImpl
E/AndroidRuntime(20134): FATAL EXCEPTION: main
E/AndroidRuntime(20134): Process: net.example.app, PID: 20134
E/AndroidRuntime(20134): java.lang.NoSuchMethodError: No virtual method setLineHeight(I)V in class Landroid/widget/TextView; or its super classes (declaration of 'android.widget.TextView' appears in /system/framework/framework.jar:classes2.dex)
E/AndroidRuntime(20134): at com.bruno.native_admob_flutter.native.NativeAdKt.applyText(NativeAd.kt:338)
E/AndroidRuntime(20134): at com.bruno.native_admob_flutter.native.NativeAdPlatformView.buildView(NativeAd.kt:85)
E/AndroidRuntime(20134): at com.bruno.native_admob_flutter.native.NativeAdPlatformView.buildView(NativeAd.kt:81)
E/AndroidRuntime(20134): at com.bruno.native_admob_flutter.native.NativeAdPlatformView.build(NativeAd.kt:52)
E/AndroidRuntime(20134): at com.bruno.native_admob_flutter.native.NativeAdPlatformView.(NativeAd.kt:235)
E/AndroidRuntime(20134): at com.bruno.native_admob_flutter.native.NativeViewFactory.create(NativeAd.kt:30)
E/AndroidRuntime(20134): at io.flutter.plugin.platform.SingleViewPresentation.onCreate(SingleViewPresentation.java:186)
E/AndroidRuntime(20134): at android.app.Dialog.dispatchOnCreate(Dialog.java:389)
E/AndroidRuntime(20134): at android.app.Dialog.show(Dialog.java:293)
E/AndroidRuntime(20134): at android.app.Presentation.show(Presentation.java:235)
E/AndroidRuntime(20134): at io.flutter.plugin.platform.VirtualDisplayController.(VirtualDisplayController.java:95)
E/AndroidRuntime(20134): at io.flutter.plugin.platform.VirtualDisplayController.create(VirtualDisplayController.java:48)
E/AndroidRuntime(20134): at io.flutter.plugin.platform.PlatformViewsController$1.createVirtualDisplayForPlatformView(PlatformViewsController.java:207)
E/AndroidRuntime(20134): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:104)
E/AndroidRuntime(20134): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:59)
E/AndroidRuntime(20134): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
E/AndroidRuntime(20134): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/AndroidRuntime(20134): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:818)
E/AndroidRuntime(20134): at android.os.MessageQueue.nativePollOnce(Native Method)
E/AndroidRuntime(20134): at android.os.MessageQueue.next(MessageQueue.java:323)
E/AndroidRuntime(20134): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime(20134): at android.app.ActivityThread.main(ActivityThread.java:6123)
E/AndroidRuntime(20134): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(20134): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
E/AndroidRuntime(20134): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)

[✓] Flutter (Channel beta, 2.2.0-10.1.pre, on Linux, locale es_ES.UTF-8)
• Flutter version 2.2.0-10.1.pre at /home/user/AndroidStudioProjects/flutterSDK/flutter/flutter
• Framework revision 0941968447 (hace 12 días), 2021-04-15 12:01:02 -0700
• Engine revision d2a2e93510
• Dart version 2.13.0 (build 2.13.0-211.6.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /home/user/Android/Sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: /opt/android-studio-4.0/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.

[✓] Chrome - develop for the web
• Chrome at google-chrome

[✓] Android Studio (version 4.1)
• Android Studio at /opt/android-studio-4.0/android-studio
• Flutter plugin version 55.1.1
• Dart plugin version 201.9335
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] Connected device (2 available)
• XT1580 (mobile) • ZY222TZ4KL • android-arm64 • Android 7.0 (API 24)
• Chrome (web) • chrome • web-javascript • Google Chrome 84.0.4147.105

• No issues found!

With interstitial and without the Native Banner, the app doesn't crash. I am using both testing ids for app and ads

from native_admob_flutter.

bdlukaa avatar bdlukaa commented on July 17, 2024

Thanks for showing these logs. I didn't know setLineHeight wasn't available on earlier api versions (< 28). I'll fix it today or tomorrow.

from native_admob_flutter.

bdlukaa avatar bdlukaa commented on July 17, 2024

Now talking about App Open Ads.

At some point, no event was triggered after the ad was displayed.

I could reproduce this on iOS, still investigating.

from native_admob_flutter.

kimmy-wang avatar kimmy-wang commented on July 17, 2024

Is there any progress?

from native_admob_flutter.

bdlukaa avatar bdlukaa commented on July 17, 2024

See #58

But you can await the show method:

await appOpenAd.show();
print('ad closed');

from native_admob_flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.