ukasz123 / fairbid_flutter

Unofficial plugin for FairBid 2.x SDK from Fyber
MIT License
5 stars 2 forks source link

Banner Views sometimes appear at the bottom of the screen instead of inside their Flutter Widget #25

Open andre-arsenault opened 3 years ago

andre-arsenault commented 3 years ago

Testing using the latest plug-in (1.0.1) and latest SDK (automatic, but 3.14.2), banner ads that should be contained within a scrolling Flutter Widget sometimes appear statically at the bottom of the screen.

Repro Steps

  1. Add the following lines to the example app's example/android/app/build.gradle to add the AdMob SDK:
    implementation 'com.google.android.gms:play-services-location:18.0.0'
    implementation 'com.google.android.gms:play-services-ads:20.1.0'
  1. Add the following lines to example/android/app/src/main/AndroidManifest.xml inside the <application> element to specify an AdMob app id:
        <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
        <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-9390556562087047~3508264974" />
  1. Run the example app.
  2. Enter 110876 for the Publisher Id and tap Start SDK.
  3. Open the Test Suite (step 6 in the app).
  4. Under AdMob and Facebook, turn on Add this test device to ensure you get an ad result, then close the test suite.
  5. Under Banner views control (step 5 in the app) enter the following ad unit ids in sequence: 208556, 208557, 208558. Close the keyboard (software "down" arrow key) after adding each ad unit.
  6. Notice that sometimes "NO_FILL" is shown where the banner should be, and instead a banner is displayed at the bottom of the screen!

Screenshot_20210517_181132_pl ukaszapps fairbid_flutter_example

andre-arsenault commented 3 years ago

I verified that this isn't exclusive to Android, it also happens on iOS. Possible underlying change in Flutter behavior?

Updating the issue title to reflect that this affects both platforms.

ukasz123 commented 3 years ago

I suspect the recent change in FairBid SDK - it retries fetching banners after initial failure. I overlooked that seeing my banner loaded successfully on the first attempt.

andre-arsenault commented 3 years ago

Do you have an estimate on when this will be resolved? I tried to do it myself but couldn't make sense of it. We're unable to update to the latest FairBid SDK without a fix.

ukasz123 commented 3 years ago

I'm going to work on this problem this weekend. At them moment I believe I've found a solution for Android implementation. Can you write how can I reproduce the problem on iOS?

andre-arsenault commented 3 years ago

That's good news, thanks!

Repro for iOS

  1. Add to example/ios/Podfile:
    pod 'Google-Mobile-Ads-SDK', '8.5.0'
  1. Add to example/ios/Runner/Info.plist:
    <key>GADApplicationIdentifier</key>
    <string>ca-app-pub-9390556562087047~3325691320</string>
  1. Publisher Id: 110893
  2. Banner view Ids: 208562, 208563, 208564
ukasz123 commented 3 years ago

@andre-arsenault I was unable to show test ads on iOS (IDFA issues or something) but on my test banner I saw the same scenario: banner initially returned an error and the loaded successfully. Please check branch issue/#25 if it works for you.

andre-arsenault commented 3 years ago

@ukasz123 that branch is looking good! I haven't been able to reproduce the issue in our app on iOS using that version.