dreamsoftin / facebook_audience_network

Flutter Facebook Audience Network
https://pub.dartlang.org/packages/facebook_audience_network/
MIT License
154 stars 95 forks source link

NativeAdResult is LOADED without not ads being shown #77

Open CalvinTp opened 3 years ago

CalvinTp commented 3 years ago

I noticed this issue happen around 20% or lesser, where NativeAdResult would indicate NativeAdResult.LOADED but the UI is blank/ empty.

I have set the keepExpandedWhileLoading to false, therefore in this case, the app is shown an empty screen when this issue occurs.

Is this an issue with FAN, library or user usage issue?

Below are the codes:

FacebookNativeAd(
          placementId: "xxxxxx", 
          adType: NativeAdType.NATIVE_AD_VERTICAL,
          width: MediaQuery.of(context).size.width * 0.95,
          height: 270,
          backgroundColor: Colors.black45,
          titleColor: Colors.white,
          descriptionColor: Colors.white,
          buttonColor: Colors.blueGrey,
          buttonTitleColor: Colors.white,
          buttonBorderColor: Colors.white,
          listener: (result, value) {
            print("Native Ad: $result --> $value");

            if(result == NativeAdResult.LOADED) {
                //Check ads
            }
          },
          keepExpandedWhileLoading: false,
          keepAlive: true,
          expandAnimationDuraion: 200,
        ),
lucdotdev commented 3 years ago

What's your plateforme ?

CalvinTp commented 3 years ago

I am observing this on iOS platform

CalvinTp commented 3 years ago

Just incase you need more info, below is the Flutter doctor

[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.4 19E266, locale en-MY) • Flutter version 1.17.5 at /Users/<....>/development/flutter • Framework revision 8af6b2f038 (5 months ago), 2020-06-30 12:53:55 -0700 • Engine revision ee76268252 • Dart version 2.8.4

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1) • Android SDK at /Users/<....>/Library/Android/sdk • Platform android-30, build-tools 29.0.1 • 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.6) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 11.6, Build version 11E708 • CocoaPods version 1.9.3

[✓] Android Studio (version 4.0) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 49.0.2 • Dart plugin version 193.7547 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

mratanpara commented 1 year ago

Did you find a solution? @CalvinTp I'm facing the same issue, It's displaying blank/empty in iOS devices.