2

I have both banner and interstitial ads in my app, but when trying to load additional native ads which I want to use in recylerviews, the result of the load with AdLoader.Builder(...).forUnifiedNativeAd is always :I/Ads: Received log message: <Google:HTML> The ad request returned a no fill for the particular slot. The error log below that says 'Malformed native JSON response' is a benign warning that will be removed in a future SDK release.

In my understanding the slot is the "placement" of this particular native ad which I have populated with a correct native_ad_id. (In test this should be ca-app-pub-3940256099942544/2247696110 or ca-app-pub-3940256099942544/3986624511)

My problem now, is that i won't be able to test the appearance of the native ads in the way which is described in: https://developers.google.com/admob/android/native/start

Why isn't there a "guarantee" on reliable results from test Ads ?

As far as I know (and understand) I have done correct, but the result from testAds will not fill...

Code snippets:

fun loadNativeAds() {

    Log.i(TAG,"loadNativAds(): ")

    val builder = AdLoader.Builder(context, getString(R.string.native_ad_unit_id_station_list))
    adLoader = builder.forUnifiedNativeAd { unifiedNativeAd ->
        Log.i(TAG,"loadNativeAds: Ad loaded: ${unifiedNativeAd.headline}")
        nativeAds.add(unifiedNativeAd)

    }.withAdListener(
        object: AdListener() {
            override fun onAdFailedToLoad(errorCode: Int){
                Log.e(TAG,"loadNativeAds: The prevous native ad failed to load with error $errorCode." +
                        "Attempt to load another.")
            }
        }).withNativeAdOptions(
            NativeAdOptions.Builder()
            .setAdChoicesPlacement(ADCHOICES_TOP_RIGHT)
            .build())
        .build()

    //adLoader?.loadAd(AdRequest.Builder().build())

    adLoader?.loadAds(AdRequest.Builder().build(),5)
}

If I use loadAds I get error 0 If I use loadAd I get error 3

MobileAds.initialize(this,getString(R.string.mobileads_app_id)) is called in MainActivity and as said, all Ad banners and interstitial are functioning properly.

Are there any (undocumented) conflicts between theese three (banner, interstitial, native) somewehere ?

RG

2020.02.09: Follow up, more information:

From a tip in a post (could not remember from where) was to use real ad-id's and run it on my emulator, those will be automatically marked as test. (You will get TestAd mark on the Ad). Then the error message changed to: I/Ads: Received log message: <Google:HTML> Incorrect native ad response. Click actions were not properly specified

Searching around in here and other places, there is not much answers... To rule out filtering in my network, I've run a test (NativeAdvancedExample), that seems to go ok.

So what am I doing wrong ?

RG

Roar Grønmo
  • 2,926
  • 2
  • 24
  • 37
  • 1
    Have you tried the Sample ad unit ID for Native Advanced Video, "ca-app-pub-3940256099942544/1044960115"? I had a similar issue on iOS, receiving no native ads, until I switched from the sample ID for Native Advanced to the one for Native Advanced Video. – pommy Apr 24 '20 at 08:14
  • I was actually adviced to use real IDs when working on emulator, it was marked as TestAd as long I used an emulator. – Roar Grønmo Apr 27 '20 at 18:20
  • I had the same problem and the solution by @pommy worked – Yannick May 25 '20 at 11:17
  • 1
    google and flutter team really do not care about this. although this is a huge bug. I still can`t get native ads admob damit – dontknowhy May 03 '21 at 04:17

0 Answers0