How do I implement AdMob ads

Get help using Construct 2

Post » Thu Feb 19, 2015 5:49 am

Hi,

Up to now, AdMobs ads fail to appear in my Google Play (exported with Intel XDK) game. The problem is very simple : nothing appears.

I added the C2 AdMob plugin.
I created an account on app.admob.com
I entered the ID for banner ads and interstitial ads, both are in the following style : ca-app-pub-0123456789012345/0123456789 (is this the correct ID that should be entered? I entered th whole thing with the "/")
I didn't add the publisher ID anywhere because C2 isn't asking for it as far as I know
I put overlap to "yes" and test to "true"
I added the Admob plugin in the third party plugins in XDK as referenced in the manual : https://www.scirra.com/manual/184/admob

My code is as follow :

At start of layout : preload banner ad
On banner ad received : Show banner ad at position bottom-center size Smart-banner

I did all this and still nothing appears in the game (which is still in beta test on google play)

Any idea what I'm doing wrong?
Thanks!
B
19
S
5
G
1
Posts: 301
Reputation: 2,192

Post » Thu Feb 19, 2015 5:59 am

Hey, I just saw this other topic - it looks like there was a bit of discussion on here.. maybe it would be helpful to you:
how-do-i-utilize-admob-in-my-games-any-easy-way_t125111
B
66
S
16
G
9
Posts: 372
Reputation: 8,748

Post » Thu Feb 19, 2015 5:59 am

Try using a different Condition to show your banner.
B
42
S
17
G
2
Posts: 850
Reputation: 6,209

Post » Thu Feb 19, 2015 6:02 am

Thanks, I'll try that. But what will happen if there is no ad preloaded? Will the banner be displayed without any ads?
I'll add a 2 second delay before the banner appears, or is it another way?

After a second thought I don't think this is the problem, because in another game mode, I have
on start on layout : preload banner ad
(at the end of level) : show banner ad (along with other events that ARE performed, in the same event)

...and the banner ad is not displayed either.

@mudmask : yup, I read this one before posting, but it didn't help. In my case, I think everything should work, and it doesn't, so I tried to describe what I did as clearly as possible to see if someone can spot an error.
B
19
S
5
G
1
Posts: 301
Reputation: 2,192

Post » Wed Mar 18, 2015 9:54 pm

My app is now released in one territory and the ads still aren't working (using Intel XDK)...
I followed every step on this link : https://www.scirra.com/manual/184/admob
And nothing appear on screen (even not an empty banner... nothing at all)

Is there any step that should be made and isn't included in the manual?
Anyone else is having problem with Admob integration?
B
19
S
5
G
1
Posts: 301
Reputation: 2,192

Post » Wed Mar 18, 2015 11:23 pm

@Rable Ya I'm also having A LOT of trouble getting AdMob to work so you aren't alone. I'll be following this thread because I belive we have the same problem.
B
5
S
1
Posts: 35
Reputation: 445

Post » Mon Mar 23, 2015 8:49 pm

I just ran a bunch of tests in order to make the ads work in my main project. One thing that I found is that you need to export to a new folder and import it in XDK. If you re-export in an existing folder, it will not work, I guess.

EDIT : For some reason, it also appear that the test ads are not displayed when I use the IDs I created for my game. However, if I select the IDs I created for my test project, it works.
Last edited by Rable on Mon Mar 23, 2015 9:37 pm, edited 1 time in total.
B
19
S
5
G
1
Posts: 301
Reputation: 2,192

Post » Mon Mar 23, 2015 9:35 pm

Rable wrote:I just ran a bunch of tests in order to make the ads work in my main project. One thing that I found is that you need to export to a new folder and import it in XDK. If you re-export in an existing folder, it will not work, I guess.


Hello,

That should not affect anything to do with ads showing. Admob gets confusing because, depending on what version of C2 youre using, Admob is implemented differently - its all about the plugin. What URL are you using for the adMob plugin in XDK??

These instructions are the best Ive found and do work:

http://shatter-box.com/knowledgebase/ad ... creen-ads/

BTW - Preload will make no difference to if an ad shows or not. You can leave preload out and an add will show but wont be preloaded and so take a second or two longer to be served.

HTH.
B
15
S
2
Posts: 229
Reputation: 1,353

Post » Mon Mar 23, 2015 9:41 pm

Thanks for the help,

I just tried 2 times the exact same build, one time exported to my existing folder, and it failed.
Then using a new folder, and the ads appeared.

Maybe I'm missing something...

I'm using the link given in the manual here : https://www.scirra.com/manual/184/admob

Name: AdMob Plugin
Plugin ID: com.cranberrygame.phonegap.plugin.ad.admob
Check the 'Plugin is located in the Apache Cordova Plugins Registry' box

And I'm using C2 v.200
B
19
S
5
G
1
Posts: 301
Reputation: 2,192

Post » Mon Mar 23, 2015 10:17 pm

I use:

Name: admob
Plugin ID: com.cranberrygame.phonegap.plugin.ad.admob
Repo URL: https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.ad.admob

Dont check the 'Plugin is located ...' checkbox.
B
15
S
2
Posts: 229
Reputation: 1,353

Next

Return to How do I....?

Who is online

Users browsing this forum: MrRobot, Youtopize and 4 guests