kmcgill88 / admob_flutter

Admob Flutter plugin that shows banner ads using native platform views.

Home Page:https://pub.dartlang.org/packages/admob_flutter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ads are not loading

Nikolak47 opened this issue · comments

I integrated everything as in the tutorial, but the ads are not displaying/loading.
PS: When I use firebase_admob plugin, the ads are loading.

do you see any errors when bringing up logcat?

Actually, yes.
Usually 'Error: 3', when I try to open interstitial ad.

I believe I'm having a similar issue:

W/Ads (23019): Not retrying to fetch app settings
I/Ads (23019): Ad failed to load : 3
I/Ads (23019): Ad failed to load : 3

Thanks!

A quick search yields this result:
https://stackoverflow.com/questions/33566485/failed-to-load-ad-3

Do your banner ads load correctly?
Do ads using test ids load?

A quick search yields this result:
https://stackoverflow.com/questions/33566485/failed-to-load-ad-3

Do your banner ads load correctly?
Do ads using test ids load?

Test ads, of any kind, work fine. Banner ads load, but only with test ids. Otherwise, they are just a black box. iOS continues to work just fine.

I'm not sure it's a fill rate issue or failure to present an ad upon request because it seemingly NEVER succeeds. Thanks!

Ensure you are using the correct App Id + Ad Id combinations per platform.

example code

You can use these test App ID's from Admob for development:

Android: ca-app-pub-3940256099942544~3347511713
iOS: ca-app-pub-3940256099942544~1458002511

Android Specific Setup

<manifest>
  <application>
    <meta-data
      android:name="com.google.android.gms.ads.APPLICATION_ID"
      android:value="ca-app-pub-3940256099942544~3347511713"/>
  </application>
</manifest>

iOS Specific Setup

Update your Info.plist per Firebase instructions.

<key>GADApplicationIdentifier</key>
<string>ca-app-pub-3940256099942544~1458002511</string>

During runtime get the correct ad id per platform.

String getBannerAdUnitId() {
  if (Platform.isIOS) {
    return 'ca-app-pub-3940256099942544/2934735716';
  } else if (Platform.isAndroid) {
    return 'ca-app-pub-3940256099942544/6300978111';
  }
  return null;
}

String getInterstitialAdUnitId() {
  if (Platform.isIOS) {
    return 'ca-app-pub-3940256099942544/4411468910';
  } else if (Platform.isAndroid) {
    return 'ca-app-pub-3940256099942544/1033173712';
  }
  return null;
}

String getRewardBasedVideoAdUnitId() {
  if (Platform.isIOS) {
    return 'ca-app-pub-3940256099942544/1712485313';
  } else if (Platform.isAndroid) {
    return 'ca-app-pub-3940256099942544/5224354917';
  }
  return null;
}

Hi there,
yes I have performed all of this correctly. Should I be seeing them in my debug builds or do I need to release an apk signed build through the Google close/internal testing track in order to see them?

I believe Google changed their policy to where I could only see MY ads once I do a 'release' of some kind:

https://stackoverflow.com/questions/57795251/android-admob-ads-are-not-showing

Going to check into this and get back. Thanks!

Thanks

This was the resolution. Put an apk into the internal test track on your Google Play account (make sure it's published. Roll it out. Wait a few hours. Download that APK to your test device with your test account that you declared in the internal test testers section. Bam. Ads show up)

Thank you so much for making this pub and for continuing to support it!
God bless

This was the resolution. Put an apk into the internal test track on your Google Play account (make sure it's published. Roll it out. Wait a few hours. Download that APK to your test device with your test account that you declared in the internal test testers section. Bam. Ads show up)

Thank you so much for making this pub and for continuing to support it!
God bless

I can display the ads ok in Android but not in iOS. Is that because I don't have the iOS version released yet?