Ad Mob not working

Hi, I developed an app with corona and I want to include Ad Mob ads which I understand are included with the Starter version, however when trying to use the example found here https://github.com/coronalabs/plugins-sample-ads-admob it says it doesn’t work on the simulator so I built it for Android and deployed it to an HTC Sensation phone and it’s not displaying any ads, just a background with some black gaps.

Do I have to do something additional in order to make it work?

Thanks,

Dario

Can you show us your code (both where the ads are implemented and your build.settings file)?

My code is the one exactly found at github  https://github.com/coronalabs/plugins-sample-ads-admob i I just built for android

Hi @dariover,

Please look at this guide and follow it carefully. In cases like this, you can’t just download a sample and build it… you need to register with AdMob, for example, provide the AppID, and several other things to activate it.

http://docs.coronalabs.com/guide/monetization/adSupport/index.html

Best regards,

Brent Sorrentino

I already have an Ad Mob account, so what you say is that I have to enter an App ID, there’s a part I don’t understand yet, how would I have an App Id if I still haven’t uploaded the application for which I am testing the adds that aren’t working yet? Can you explain that to me please?

Thanks

Ok I published my app free without ads, obtained an App ID and then an Ad Mob publisher Id, my app is available but without ads, I entered my Ad Mob publisher ID in the line that reads – Your application ID local appID = “xxxxxxx” after I publish to Android the app just sits there till it hangs, are there any other lines I am supposed to change or where can I see a complete tutorial about this? the link you provided gives very little information.

dariover,

It should be very simple to get this to work. In your main.lua:

local provider = "admob" local appID = "your\_app\_id" local ads = require "ads" if appID then ads.init( provider, appID) end

Copy and paste the plugin code from that tutorial doc into your build.settings file and then anywhere you want to show an ad

use:

ads.show( “interstitial”, { x=0, y=0 } )

or

ads.show( “banner”, { x=0, y=0 } ).

If you want to remove the ad, call ads.hide(). It’s as simple as that. I just changed over to admob on Friday myself and had no problems getting it to work

Can you show us your code (both where the ads are implemented and your build.settings file)?

My code is the one exactly found at github  https://github.com/coronalabs/plugins-sample-ads-admob i I just built for android

Hi @dariover,

Please look at this guide and follow it carefully. In cases like this, you can’t just download a sample and build it… you need to register with AdMob, for example, provide the AppID, and several other things to activate it.

http://docs.coronalabs.com/guide/monetization/adSupport/index.html

Best regards,

Brent Sorrentino

I already have an Ad Mob account, so what you say is that I have to enter an App ID, there’s a part I don’t understand yet, how would I have an App Id if I still haven’t uploaded the application for which I am testing the adds that aren’t working yet? Can you explain that to me please?

Thanks

Ok I published my app free without ads, obtained an App ID and then an Ad Mob publisher Id, my app is available but without ads, I entered my Ad Mob publisher ID in the line that reads – Your application ID local appID = “xxxxxxx” after I publish to Android the app just sits there till it hangs, are there any other lines I am supposed to change or where can I see a complete tutorial about this? the link you provided gives very little information.

dariover,

It should be very simple to get this to work. In your main.lua:

local provider = "admob" local appID = "your\_app\_id" local ads = require "ads" if appID then ads.init( provider, appID) end

Copy and paste the plugin code from that tutorial doc into your build.settings file and then anywhere you want to show an ad

use:

ads.show( “interstitial”, { x=0, y=0 } )

or

ads.show( “banner”, { x=0, y=0 } ).

If you want to remove the ad, call ads.hide(). It’s as simple as that. I just changed over to admob on Friday myself and had no problems getting it to work

Hi … if i want to show ads in every level, should i use ads.show in every level?  

The problem is, i use ads.show in menu… but when the level is win… i use purge and reload scene (then it returns to menu and ads are dissapear). So what i’m doing wrong? Thanx

Hi … if i want to show ads in every level, should i use ads.show in every level?  

The problem is, i use ads.show in menu… but when the level is win… i use purge and reload scene (then it returns to menu and ads are dissapear). So what i’m doing wrong? Thanx