I\'m setting an ad to my Android application using DoubleClick and can\'t manage to show the final ad, can someone help me?
When I test an ad by adding ".addTest
My problem was with Payment. I refreshed my payment method and it helped me.
I've made the stupidest error. Passed app id into MobileAds.initialize
from one app and used placement id in loadAd
from another admob app.
Once I corrected placement id all come to work.
There is one option which helped in our case. As @blizzard mentioned in your application settings in Google Developer Console there is a section which called "Pricing and Distribution". In this section there is a checkbox "CONTAINS ADS". In our case it was disabled. After enabling we successfully received ads.
This is a simple WORKAROUND (no solution):
You can install a mediation such as InMobi: https://developers.google.com/admob/android/mediation/inmobi
In this way, if for whatever reason admob is not showing you ads, you can still show them from other ad networks.
W/Ads: Failed to load ad: 3
Means: The ad request was successful, but no ad was returned due to lack of ad inventory.
So, In my case, I have commented the keywords:
property to load all types of ads. Now my ad is loading properly.
static final MobileAdTargetingInfo targetingInfo = MobileAdTargetingInfo(
testDevices: testDevice != null ? <String>[testDevice] : null,
nonPersonalizedAds: true,
//keywords: <String>['Fitness', 'Yoga', 'Health', 'Exercise', 'Game', 'Doctor', 'Medical'],);
in my case :
I/Ads: Ad failed to load : Account not approved yet.
but you need to implement the listener for knowing the error
First import the listener : import com.google.android.gms.ads.AdListener;
Second create variable : private final String TAG2 = com.ringtones.splash.class.getSimpleName();
mAdView.setAdListener(new AdListener() {
@Override
public void onAdLoaded() {Log.d(TAG2, "google banner ad loaded"); }
@Override
public void onAdFailedToLoad(LoadAdError adError) {Log.d(TAG2, "google banner ad failed to load : "+ adError.getMessage());}
@Override
public void onAdOpened() {Log.d(TAG2, "google banner ad opened");}
@Override
public void onAdClicked() {Log.d(TAG2, "google banner ad clicked");}
@Override
public void onAdLeftApplication() {Log.d(TAG2, "google banner ad left application");}
@Override
public void onAdClosed() {Log.d(TAG2, "google banner ad closed");}
});