Admob ads not showing up on released app Android

388 views
Skip to first unread message

Sam

unread,
Mar 29, 2011, 10:40:17 PM3/29/11
to Google AdMob Ads Developers
Hello all
I recently added admob ads to my android app. After an hour or two of
trying to figure out how to make the dang code work, I finally got it
to work on my emulator. I didn't know it would be different for the
released version so I published my app's update. But the ads don't
show up on the published version of the app! Am I just not waiting
long enough? I am getting requests (680 so far) but the only revenue
I've gotten is the times I've tested my app on the emulator.

My code:
On the .java:

//Create the adView
AdView adView = new AdView(this, AdSize.BANNER, "xxxxxxxxxxx" );
// Lookup your LinearLayout assuming it’s been given
// the attribute android:id="@+id/mainLayout"

LinearLayout layout = (LinearLayout)findViewById(R.id.mainLayout);
layout.addView(adView);
// Initiate a generic request to load it with an ad
adView.loadAd(new AdRequest());

On my manifest:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|
orientation"/>

<meta-data android:value="xxxxxxxxxxxx"
android:name="ADMOB_PUBLISHER_ID" />
</application>

On my XML:
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content" android:id="@+id/mainLayout"></
LinearLayout>

Thanks in Advance,
Sam

Daniel Bretzigheimer

unread,
May 7, 2014, 3:03:36 PM5/7/14
to google-adm...@googlegroups.com, sparky...@gmail.com
Hey Sam,
yes I know this was 3 years ago, but I have the same problem and can't find a proper solution. 
I hope you can help me if you have solved the problem.

Yours sincerely
Daniel


Eric Leichtenschlag

unread,
May 8, 2014, 5:02:19 PM5/8/14
to google-adm...@googlegroups.com, sparky...@gmail.com
AdMob pays per click. So if nobody clicks the ad, there is no revenue.

As an aside, you should really specify your device as a test device during development to avoid clicking on production ads. Here is how you can do that.

Thanks,
Eric
Reply all
Reply to author
Forward
0 new messages