Saboor Siddique
Saboor Siddique

Reputation: 129

live admob ads are not displaying on my device

I have integrated admob in my android app. After testing the test adds successfully I added real ad unit ids and real ad app-id in my app and removed the line .addTestDevice(AdRequest.DEVICE_ID_EMULATOR) and then run my application , but no live ads are displaying. I did not upload my app on any app store yet, just want to see the real adds displaying on my app, before uploading it on playstore. Please guide me , why I can't see the real ads on my device after running application.

I am posting my code snippet also.

 MobileAds.initialize(this, "ca-app-pub-2201056801594151~4232865074");


    interstitialAd = new InterstitialAd(this);

    interstitialAd.setAdUnitId(getString(R.string.interstitial_ad_unit_id));

    AdRequest adRequest = new AdRequest.Builder().build();
    interstitialAd.loadAd(adRequest);



    interstitialAd.setAdListener(new AdListener(){
        public void onAdLoaded(){
            if(interstitialAd.isLoaded()) {
                interstitialAd.show();
            }
            else{
                Toast.makeText(getApplicationContext(), "Ad did not load", 
      Toast.LENGTH_SHORT).show();

            }
        }
    });

Upvotes: 0

Views: 49

Answers (1)

Ajit Jadhav
Ajit Jadhav

Reputation: 44

After adding admob live ads ID it will display in your app after 24 hours. wait for 24 hrs your ads will automatically displayed in your app.

Upvotes: 1

Related Questions