AdMob

walterf25

Expert
Licensed User
Longtime User
Hi guys, i'm working with admob ads, and i got everything to work ok, but for some reason the ads work wheni load the app on my phone but the ads don't appear when i use the emulator, I've seen somewhere in the tutorials that there is a line that needs to be added in when you are using the emulator but is not working on mine for some reason, can anyone help me out, i really need to finish this so i can publish my app.

thanks guys!!!!!

Walter
 

walterf25

Expert
Licensed User
Longtime User
Ok, i looked at the logfile and it says this
"onFailedToReceiveAd(Ad request successful, but no ad returned due to lack of ad inventory.)"
"To get test ads on this device, call adRequest.addTestDevice(AdRequest.TEST_EMULATOR);"
first of all where do I add the adRequest.addTestDevice line, and why does it say that no ad returned due to lack of ad inventory,
please anybody, i need help!!!!!!!!!!
 
Upvote 0

admac231

Active Member
Licensed User
Longtime User
There really is no need for the ad to show in the emulator. It works on actual devices so what's the issue?

The ads won't show in the emulator because admob knows an emulator is requesting an ad.

As for where to add that line I have no idea but really it shouldn't be a problem.

Edit: The setTestDevices hasn't worked since Google took over AdMob (http://www.b4x.com/forum/basic4andr...ial-add-ads-your-application-5.html#post46844)
 
Last edited:
Upvote 0

pluton

Active Member
Licensed User
Longtime User
Ok, i looked at the logfile and it says this
"onFailedToReceiveAd(Ad request successful, but no ad returned due to lack of ad inventory.)"
"To get test ads on this device, call adRequest.addTestDevice(AdRequest.TEST_EMULATOR);"
first of all where do I add the adRequest.addTestDevice line, and why does it say that no ad returned due to lack of ad inventory,
please anybody, i need help!!!!!!!!!!

This is my test add:
add.png


In my every app test add always showed in emulator. You are missing something.
Did you:
  • Update to Android SDK level 13 or above
  • Rename the jar file and change its name to GoogleAdMobAdsSdk.jar
  • Add a reference to AdMob and GoogleAdMobAdsSdk libraries
  • Add needed lines in manifest
  • Tick Do Not Overwrite Manifest (in the IDE)
  • ...
 
Upvote 0
Top