Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

AdMob Test Ads not working in my App

144 views
Skip to first unread message

Edward Quixote

unread,
Jun 14, 2014, 4:20:34 AM6/14/14
to google-adm...@googlegroups.com
Enter code here...

   

<com.google.android.gms.ads.AdView


       

android:id="@+id/adBanBottHomeSmallay"


       

android:layout_width="wrap_content"


       

android:layout_height="wrap_content"


       

ads:adSize="SMART_BANNER"

ads:adUnitId="@string/adIDBanBottHomeSmallay"

/>




       

@Override


       

protected void onCreate(Bundle savedInstanceState) {


               

super.onCreate(savedInstanceState);


                setContentView(R.layout.

activity_knigh_tbar_home);


               


               

lstHome = (ListView)findViewById(R.id.lstHome);


               


               

adBanBottHomeSmallay = (AdView)findViewById(R.id.adBanBottHomeSmallay);


               


                stuffToDoWithAdBanBottHomeSmallay();


               


        }



       

/**


         * This method deals with most stuff involving


         * the Ad in this Activity:


         * AdBanBottHomeSmallay


         */


       

private void stuffToDoWithAdBanBottHomeSmallay() {


               


                AdRequest adreqBanBottHomeSmallay =

new AdRequest.Builder()


                                .addTestDevice(AdRequest.

DEVICE_ID_EMULATOR)


                                .addTestDevice(getString(R.string.

adRequestTestCodeMyLGE400))


                                .build();


               

adBanBottHomeSmallay.loadAd(adreqBanBottHomeSmallay);


               


        }


I'm trying to use test ads in my App, but they're not showing.
No Test Ad comes up even after waiting for 18 minutes with the App still running.
I'm sure about the Hashed ID and Ad ID.
I'm using Google Play Services SDK and the Device am testing on is: LG E400 running on Android 2.3.6.
What could the problem be?
 
Please find attached<Log>

Kunal Verma

unread,
Jun 14, 2014, 4:27:00 AM6/14/14
to Google AdMob Ads Developers
Cannot view the Log?
It says an Error has occured.


--

---
You received this message because you are subscribed to the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Edward Quixote

unread,
Jun 14, 2014, 6:52:22 AM6/14/14
to google-adm...@googlegroups.com
 
Here is the Log:
<Find Attached>
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
KnighTBar14062014_147PM.txt

Kunal Verma

unread,
Jun 14, 2014, 7:20:12 AM6/14/14
to Google AdMob Ads Developers
Seems like the Layout isn't allowing the ad to be shown.
06-14 13:45:51.469: W/Ads(5300): Not enough space to show ad. Needs 240x37 pixels, but only has 216x241 pixels.
06-14 13:45:51.709: W/Ads(5300): Not enough space to show ad. Needs 240x37 pixels, but only has 216x265 pixels.
06-14 13:45:51.719: W/Ads(5300): Not enough space to show ad. Needs 240x37 pixels, but only has 216x241 pixels.

Can you try giving more space to the adView. It seems that the height isn't sufficient for the Smart_banner to be shown on that particular device you are testing on. Your layout is portrait, right?




To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.

Edward Quixote

unread,
Jun 14, 2014, 8:27:40 AM6/14/14
to google-adm...@googlegroups.com
 
Hey Buddy,
I've removed all other Views in that activity and left the Ad to be at the top.
But still the same error comes in the LogCat. What could be the problem?
<find attached>
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
KnightBar14062014_305PM.txt

Kunal Verma

unread,
Jun 14, 2014, 8:48:46 AM6/14/14
to Google AdMob Ads Developers
Instead of finding what you missed, what you can do is download the example project from here to check . The example will always work. The test code if not in the example, its here
You see it working, copy and paste the code from example into your app.




To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.

Edward Quixote

unread,
Jun 14, 2014, 9:02:50 AM6/14/14
to google-adm...@googlegroups.com
Thanks Buddy,
I appreciate.

Eric Leichtenschlag

unread,
Jun 15, 2014, 2:39:45 PM6/15/14
to google-adm...@googlegroups.com
Smart banner requires the full width of the screen. If you created a new Android app, Android automatically creates some margins and adds them to your main layout, which will make the AdView too small. Check your main layout to see if there is any marginLeft or marginRight attributes, and get rid of those.

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