Search code examples
javaandroidadmobadsnative-ads

Are Native Express Ads Deprecated?


I tried implementing Native Express Ads, but for testing purposes i can't find the test ad id.

I found alot of posts which just used the test id for banner ads ca-app-pub-3940256099942544/6300978111and for some reason this does work.

Now my question is if Native Express Ads are still recommended to use as an ad type or are they deprecated and should i switch to Native Advanced Ads?

My code

LinearLayout adContainer  = findViewById(R.id.adContainer);
mAdView = new NativeExpressAdView(getApplicationContext());
mAdView.setAdSize(new AdSize(320,50);
mAdView.setAdUnitId("ca-app-pub-3940256099942544/6300978111");
adContainer.addView(mAdView);

LinearLayout adContainer2  = findViewById(R.id.adContainer2);
mAdView2 = new NativeExpressAdView(getApplicationContext());
mAdView2.setAdSize(new AdSize(320,50);
mAdView2.setAdUnitId("ca-app-pub-3940256099942544/6300978111");
adContainer2.addView(mAdView2);

AdRequest adRequest = new AdRequest.Builder().addTestDevice("4EF772AE9549741BE0E1FCA236C7382C").build();
mAdView.loadAd(adRequest);
mAdView2.loadAd(adRequest);

Solution

  • Yes you are right now google has replaced Native Express Ads with Native Advanced Ads. Here is the official link of Google Admob documentation

    https://developers.google.com/admob/android/native/advanced