Quantcast
Channel: Active questions tagged listview - Stack Overflow
Viewing all articles
Browse latest Browse all 611

Why does AdMob return NO FILL

$
0
0

I'm using an AdMob view in an android app, but I'm unable to get any ad into the app.

For reference, I've added the view to a ListView as explained by Dan Dyer here

EDIT:I'm using GoogleAdMobAdsSdk-4.1.1. The release notes of Google AdMob Ads SDK for version 4.1.0 says:

"...- Added support for AdRequest.addTestDevice() and AdRequest.setTestDevices(). Note that AdRequest.setTesting() is now deprecated...."

This is how the ad is inserted to my ListView:

public View getView(int position, View convertView, ViewGroup parent) {  // Some other code  // Reusing convertView etc.  AdView adView =      new AdView((Activity) getContext(), AdSize.BANNER, "/xxxxxx/ca-pub-xxxxxxx/my_ad_unit");  for (int i = 0; i < adView.getChildCount(); i++) {    adView.getChildAt(i).setFocusable(false);  }  adView.setFocusable(false);  float density = getContext().getResources().getDisplayMetrics().density;  int height = Math.round(50 * density);  AbsListView.LayoutParams params = new AbsListView.LayoutParams(    AbsListView.LayoutParams.FILL_PARENT, height);  adView.setLayoutParams(params);  AdRequest request = new AdRequest();  request.addTestDevice("xxxxxxxxxxxxxxxxx");  adView.loadAd(request);  // other stuff  // returning convertView}

I've also added an AdListener to the adview, and on every loadAd, the onFailedToReceiveAd callback method is called:

public void onFailedToReceiveAd(Ad arg0, ErrorCode arg1) {  Log.d(TAG, "AdMob in list failed to receive ad: "+ arg1.name());}

In logcat I get this message:

08-17 15:22:18.065: AdMob in list failed to receive ad: NO_FILL

Can anyone tell me what this errorcode means?


Viewing all articles
Browse latest Browse all 611

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>