Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Admob ads not showing up

Tags:

android

admob

I am trying to implement Admob in Android and I am seeing requests coming into AdMob. However, I am not seeing the Admob ads being displayed on the Android screen in the emulator and my Android test phones as well.

As stated before, I can see the requests coming into my AdMob account. However, the content is not being shown. Is there something that needs to be enabled in my account, the main.xml, AndroidManifest.xml, or in the loading of the application?

My application configuration and code are below. Please advise on what is needed. Thanks!

AndroidManifest:

          <meta-data 
            android:value="My Publisher ID"
            android:name="ADMOB_PUBLISHER_ID" />
        <activity android:name="com.admob.android.ads.AdMobActivity"/>
        <receiver 
            android:name="com.admob.android.ads.analytics.InstallReceiver"
            android:exported="true">
         <intent-filter>
         <action android:name="com.android.vending.INSTALL_REFERRER"/>
         </intent-filter>
         </receiver>
         <meta-data 
             android:value="true" 
             android:name="ADMOB_ALLOW_LOCATION_FOR_ADS"/>

main:

 <com.google.ads.AdView
    android:id="@+id/adView"
   android:layout_alignParentBottom="true"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    ads:adSize="BANNER"
    ads:adUnitId="My Publisher ID"
    ads:loadAdOnCreate="true"/>

On Create Code:

        AdView adView = (AdView)this.findViewById(R.id.adView);
        AdRequest re = new AdRequest();
        re.setTesting(true);
        adView.loadAd(re);

Any help is appreciated!!

like image 959
AlbaresApps Avatar asked Aug 08 '11 04:08

AlbaresApps


People also ask

Why is my AdMob ads not showing?

Ads won't show if you haven't integrated the Google Mobile Ads SDK correctly. Is your ad implementation code working properly? Test your implementation code to check that ads can show. You can also use ad inspector to test your app's ad serving.

How long does it take for AdMob ads to show?

Ad serving When apps are newly registered with AdMob, it typically takes up to an hour and a few ad requests to allow inventory to build. Because of this, you may not see live impressions immediately. Note: In some cases, it may take longer than an hour. Please wait 24 hours before seeking additional help.

How do I know if AdMob ad is working?

Test devices You can configure your device as a test device and use your own ad unit IDs that you've created in your AdMob account. When you enable a test device, the AdMob Network sends production ads in test mode to your device using the ad unit IDs you've created in your AdMob account.


2 Answers

  1. Go to app settings on admob.com and make sure use location data for ads is turned off if your app is not a location based app.

    Use location data for ads is used to filter ads based on location and works only on app with location permission granted. If app does not use location permission, ads will not show.

  2. Make sure your have filled payment details

like image 147
Anga Avatar answered Sep 30 '22 13:09

Anga


It usually takes some time for ads to start appearing via admob. This happens in the case when you have just registered on admob and started up with your first application. If the suggestions given above are taken care of and if your admob page shows a "green" status, I wont worry about it too much. Once your fill rate increases, you will start to see more and more ads.

like image 38
Anand Sainath Avatar answered Sep 30 '22 13:09

Anand Sainath