I’m trying to test the ads in my app, I’m using the following test ads unit :
<string name="APP_ID">ca-app-pub-3940256099942544~3347511713</string> <string name="INTERSTITIAL_ADMOB">ca-app-pub-3940256099942544/1033173712</string> InterstitialAd.load(activity, StringUtils.getString(R.string.INTERSTITIAL_ADMOB), adRequest, new InterstitialAdLoadCallback() { @Override public void onAdLoaded(@NonNull InterstitialAd interstitialAd) { interstitialAd.show(activity); interstitialAd.setFullScreenContentCallback(new FullScreenContentCallback() { @Override public void onAdDismissedFullScreenContent() { adsCallBack.onAdClosed(); Log.d("TAG", "The ad was dismissed."); } @Override public void onAdShowedFullScreenContent() { Log.d("TAG", "The ad was shown."); } }); } @Override public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) { Log.d("AdMob", "==> " +loadAdError.getMessage()); } });
I always get : No ad config
I’ve added the following line to my app-ads.txt
google.com, pub-3940256099942544, DIRECT, f08c47fec0942fa0
AdMob SDK :
implementation 'com.google.android.gms:play-services-ads:20.4.0'
Response Info :
{ "Response ID": "null", "Mediation Adapter Class Name": "", "Adapter Responses": [] }
NOTE : The real ads are working fine, but the test one no.
Advertisement
Answer
Solution is updating the AdMob SDK to 20.5.0