4

I've read the way to put Admob Native Ads into a Listview from here: Putting an AdMob native ad in a listView

If my assumption is correct, then the ad will be loaded once the user scroll to the position. Is it possible to pre-load the native ads like at the same position as requesting list data from the server?

And also is it permitted by Google to load the ads multiple time, like when I want to show ads at every 10th position?

Any advice would be appreciated.

Thank you & Regards.

Community
  • 1
  • 1

1 Answers1

1

I followed all Native Express Adview questions since 2 weeks but never found a correct answer for me and I hope I can help you (Or anyone that read it) with my own solution.

I use this on my Fragment Adapter.

   contadorAnuncio=position; // position is the number of item assigned on listview  



    if (contadorAnuncio > 0 && contadorAnuncio % 9 == 0)
    {


        Log.i("Inicio en 10", "inicio anuncio"); 
        convertView.findViewById(R.id.adView).setVisibility(View.VISIBLE);
        NativeExpressAdView adView = (NativeExpressAdView) convertView.findViewById(R.id.adView);
        adView.loadAd(new AdRequest.Builder().build());
        adView.setTag(position);



    }else{
        convertView.findViewById(R.id.adView).setVisibility(View.GONE);

    }



    return convertView;

}

And this before ending my xml.

Don't forget to add:

android:visibility="gone" and xmlns:ads="http://schemas.android.com/apk/res-auto"

and change adSize.

 <com.google.android.gms.ads.NativeExpressAdView
    android:id="@+id/adView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    ads:adUnitId="@string/native_express_ad_unit_id"
    ads:adSize="FULL_WIDTHx400" 
    android:visibility="gone">
</com.google.android.gms.ads.NativeExpressAdView>

Check how integrated are ads with Native Express Adview.

Native Express Adview on my App

Calavera
  • 13
  • 7