Brandon
Brandon

Reputation: 703

Android Admob is not Showing Up

Admob is not showing up on my emulator or on the device it self. I tried with testing mode on and off. Relevant Manifest data: permissions:

<uses-permission android:name="android.permission.INTERNET" /> 
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />

meta data:

<meta-data android:value="true" android:name="AD_REQUEST" />
<meta-data android:value="false" android:name="TEST_MODE" />
<meta-data android:value="xxxxxxxxxxxxxxxx" android:name="ADMOB_PUBLISHER_ID" />

The x's are actually my ID.

My whole main.xml:

<com.admob.android.ads.AdView  
     android:id="@+id/ad" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content"
 android:visibility="visible"
 android:layout_alignParentTop="true"/>

Hopefully I can get this solved soon...

Upvotes: 1

Views: 2520

Answers (1)

Abhinav Manchanda
Abhinav Manchanda

Reputation: 6641

In my opinion, when you disable test mode, Admob does not have ads for you. When you enable it, it might not be showing ads because you've not added test devices. Try adding test devices and see if you get ads -

  • Switch test mode on
  • Add your emulator and actual device as test devices in your code as specified in the PDF specifications. Try putting that bit of code in your onCreate method above the line where you set your layout file.
  • Login to your Admob account on your desktop and make sure the test mode settings are set to client mode.
  • Try running the app on your emulator first.

If you do not get ads, try looking into your log to see if it says anything about admob, and see if you can find anything useful there ? Also, after you've run your app for sometime and do not see ads, wait for about 10-20 minutes and then see if the number of requests on your admob site shows any increase ?

Upvotes: 1

Related Questions