AdMob doesn't display Ads in my Game

My Settings:

settings = { plugins = { ["CoronaProvider.ads.admob"] = { publisherId = "com.coronalabs", }, }, android = { usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.READ\_PHONE\_STATE", }, }, orientation = { --default = "landscapeRight", }, iphone = { plist= { UIStatusBarHidden=true, UIAppFonts = { "SnackerComic.ttf" }, UIApplicationExitsOnSuspend = true }, }, }

My code:

-- Load Corona 'ads' library local ads = require "ads" local function adListener( event ) if event.isError then --event Failed to receive an ad. print("Failed to receive an ad.") else print('Ad success') end end ads.init( "admob", "ca-app-pub-3611746718456623/1151739395", adListener )

Then… code to show ads when a game is lost:

ads.show( “banner”, { x=display.contentWidth/2, y=display.contentHeight/2} )

The app slows down like it’s loading an add (2 second pause), but then nothing displays, and the game carries on as normal.

I’m testing the app out on a Samsung Galaxy Tab 2 device.

Did you get this solved by now? My AdMob ad doesn’t show here either.

Are you getting any errors in your console log on the device?  If you need help learning how to read that console log, this tutorial will be of help:

http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

On Android, errors can come from other things besides corona, so when you run the command to read the log, just do:

adb logcat

with no other parameters.  It’s going to dump a bunch of garbage at you and you have to be patient to look for the errors.

Rob

Hi Rob, thanks a lot for getting back, and sorry, my problems are now all solved and the ad displays! It started to work automatically after a while, perhaps coincidentally or perhaps not, that was right after I also provided my details in the old AdMob site (I had already set up things in the new AdMob site, but perhaps they don’t support asking for e.g. tax information yet). Maybe it’s just a side-issue of AdMob switching to a new UI. (I also had some wrong parameters in the beginning, but just fixing these didn’t help on its own.)

Thanks again!

Did you get this solved by now? My AdMob ad doesn’t show here either.

Are you getting any errors in your console log on the device?  If you need help learning how to read that console log, this tutorial will be of help:

http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

On Android, errors can come from other things besides corona, so when you run the command to read the log, just do:

adb logcat

with no other parameters.  It’s going to dump a bunch of garbage at you and you have to be patient to look for the errors.

Rob

Hi Rob, thanks a lot for getting back, and sorry, my problems are now all solved and the ad displays! It started to work automatically after a while, perhaps coincidentally or perhaps not, that was right after I also provided my details in the old AdMob site (I had already set up things in the new AdMob site, but perhaps they don’t support asking for e.g. tax information yet). Maybe it’s just a side-issue of AdMob switching to a new UI. (I also had some wrong parameters in the beginning, but just fixing these didn’t help on its own.)

Thanks again!