1

I just submitted an update to one of my apps on the Play Store and noticed the app was no longer being served ads. I use AdMob mediation and have Millennial Media as a second ad source.

When running my app through Android Studio I'm able to see ads on the emulator and on my android device (for both Millennial media and AdMob). However, when I generate a signed release APK and install that on my android device the ad request always returns ERROR_CODE_NO_FILL.

If I remove Millennial Media or have AdMob first, then I can see AdMob ads in my production app. So it looks like it's an issue with Millennial Media.

My Millennial Media account looks fine, and I can see impressions for the ads that've showed up during testing. So I thought it might to be an issue with the keystore, but then I shouldn't have been able to publish the update to the Play Store right?

I've also tried:

  • updating the play service api from 'com.google.android.gms:play-services:6.+' to 'com.google.android.gms:play-services:7.+'
  • performing the latest android studio updates
  • cleaning and rebuilding the solution
  • updating buildToolsVersion to "22.0.1"
  • updating compileSdkVersion and targetSdkVersion to 22

It's difficult to investigate as it's a release APK, and the only information I've got is the integer error code passed into the AdListener onAdFailedToLoad method.

I've simply removed Millennial Media from the ad mediation for now. But if anyone's has faced a similar issue I'd really appreciate any help or advice you could offer.

peterrhodesdev
  • 241
  • 4
  • 14

1 Answers1

0

NO_FILL("Ad request successful, but no ad returned due to lack of ad inventory.")

You should do an if statement so as to do something else when the error is received.

It should work as-is but...

You need to fill in the if with something and put it BEFORE calling loadAd()

    AdListener al = new AdListener() {
        @Override
        public void onAdFailedToLoad(int errorCode) {
            super.onAdFailedToLoad(errorCode);

            if (errorCode == AdRequest.ERROR_CODE_NO_FILL) {
                Log.e("", "AD ERROR: NO FILL");
                // Do something here when error is received

            }

        }
    };

    mAdView.setAdListener(al);

Feel free to copy paste the code its not like I care here.

CmosBattery
  • 934
  • 7
  • 13
  • Thanks for the response. I'm currently handling the errors, but I was more curious as to why the error is occurring. I can't understand the inconsistent behaviour between the debug and release APKs. – peterrhodesdev May 13 '15 at 07:10
  • I assume that might have something to do with (like your error) QUOTE "I think I've implemented everything correctly, so why am I not seeing ads? While maintaining the highest possible fill rate is one of our top priorities, we may not always have an ad available for every ad request." https://developers.google.com/mobile-ads-sdk/docs/admob/android/faq#whynoads You might also be able to find something else in the discussions here: https://groups.google.com/forum/#!categories/google-admob-ads-sdk Anyway, since only test ads should be shown during development there will be differences. – CmosBattery May 13 '15 at 15:59