Ads not showing for correct app package name

Viewed 1127

Live ads from Google Ad Manager are not showing on correct app package name (eg. com.android.test) and returns the error below

{
      "Code": 3,
      "Message": "No ad config.",
      "Domain": "com.google.android.gms.ads",
      "Cause": "null",
      "Response Info": {
        "Response ID": "null",
        "Mediation Adapter Class Name": "",
        "Adapter Responses": []
      }
}

Testing ad units ID are showing fine with no issue, but strangely if I changed my app package name to others like com.android.test.dev or com.android.test.staging the live ads will be shown without any issue as well.

I have seen a few people that has faced the same issue but it doesn't really help

https://groups.google.com/g/google-admob-ads-sdk/c/xhwxgDyu5Ds/m/X09ha2L4AQAJ

https://groups.google.com/g/google-admob-ads-sdk/c/Og5Gai4Vt4g/m/I4ZVM99qBQAJ

I am only using Google Ad Manager SDK 'com.google.android.gms:play-services-ads:19.7.0', not using AdMob

Thank you in advance!

1 Answers

After contacting Google Ads support, the reason behind this is due to our app is targeting kids age 6 - 12

The app will need to comply to this policy Tag a site or ad request for child-directed treatment https://support.google.com/admanager/answer/4442399?hl=en

In the app, we'll need to setTagForChildDirectedTreatment to true and maxAdContentRating to G in MyApplication, can refer to this link https://support.google.com/admanager/answer/9467073?hl=en#zippy=%2Ccode-sample-for-implementation-in-apps-for-everyone-including-children-and-families

 MobileAds.initialize(this)
 val config = MobileAds.getRequestConfiguration().toBuilder()
        .setTagForChildDirectedTreatment(TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE)
        .setMaxAdContentRating(MAX_AD_CONTENT_RATING_G).build()
 MobileAds.setRequestConfiguration(config)

Hope this is helpful to everyone facing the same issue.

Related