[Updated to 1.1] Monetize your Android game with the AdMob extension!!!

rob1221

  • *
  • Posts: 9472
Are those smart quotes?  That might explain the character error.

FranAlt

  • Posts: 169
Yay! Thanks, that was it. I copied the code from the PDF and had smart quotes, replaced with (') and compiled. Now lets see if the ads show up :D
Swipe - FREE          Cloud Run - FREE              
                                  
         iOS                                Android
    Android

Abliblablobla

  • *
  • Posts: 524
I don't think that the smart quotes are the problem.

If you see your logs, there is an error about your sixteenth character. Excluding the quotes, in your case the sixteenth character is a space, while in my case it is a zero. In fact if you look carefully look at the example, there are no spaces between the AdMob publisher code and the number zero.

I would suggest you to delete the space you added and try to compile again leaving it as it is.

EDIT: I have just realized that while in the image example there are no spaces between the publisher ID and the position values, there is a space between them in the written example. Please use the image example as reference. I will edit the beginner guide as soon as I have some spare time.

« Last Edit: June 17, 2013, 10:56:58 pm by Abliblablobla »
.: BuruBuru :.

rob1221

  • *
  • Posts: 9472
Extra spaces between parameters aren't counted.  You can have 10 spaces on both sides of the comma and it will work fine.

Abliblablobla

  • *
  • Posts: 524
@rob1221

oh, I didn't know it... I'm sorry for my misleading post!

@FraAlt

I attached an image of the part where I am using AdMob. It works and it is pretty simple. The only thing that you should pay attention to is when you try to compile for non-Android targets because you will get an error.
.: BuruBuru :.

h1rnz1lla

  • *
  • Posts: 649
just wanted to say big thanks for your effort!
setting up and get it to run was easy as pie. still i have the same issue with ads not showing if i return to the app from the background. I'm running a Samsung Galaxy S2 with 4.1.2

*edit now it seems to work...

**edit ok sometimes it works sometimes not, mhhhhh...

« Last Edit: July 02, 2013, 03:15:26 pm by h1rnz1lla »

Abliblablobla

  • *
  • Posts: 524
@h1rnz1lla

I am happy to share this kind of things as your opinions help me improve more and more!

About your issue: I checked the code a lot of times and couldn't understand why ads sometimes show and sometimes don't when you close and reopen your game. There are three possibilities:
 - I am missing something ( :) );
 - The AdMob SDK Stencyl is using is outdated (4.x vs 6.x). Perhaps this old SDK version has some bugs or incompatibility issues with newer devices since it was released before Android 4.x.
 - There are some underlying issues when integrating AdMob in Haxe NME. Jon himself said he was forced to choose an older version of AdMob SDK since he got some errors when implementing the newer versions.

Thanks for sharing your experience!

If someone has any ideas, I am ready to listen!
.: BuruBuru :.

mbuist

  • Posts: 252
Is this going to be for IOS aswell. Or just android
Visit my arcade site - http://www.tincubegames.com/
Read all about my games at - http://www.tincubemedia.nl
Please follow Tincube Media on Facebook - http://www.facebook.com/tincubemedia

As a final touch.. GOD created the Dutch

Abliblablobla

  • *
  • Posts: 524
@mbuist

As of now, I have to say no. I would like to develop extensions for iOS as well, but I am having some troubles with Stencyl/Haxe NME and I'm not the only one here having some difficulties with iOS extensions. There are also some issues when importing libraries so I can do very little until someone helps me tackling these issues. If I can put my hand on a working extension for iOS I can try to figure out how to create an iOS extension. I hope some day I will be able to do it!...
.: BuruBuru :.

bonzero

  • Posts: 488
Has anyone been able to compile with a recent build of the beta? In my case even the admob test stays compilling forever and on the logs seems like theres a missing hx somewhere. I replaced the ads folder and followed the pdf (1.1) cant wait to test the android markets

bonzero

  • Posts: 488
Forget my previous message, I don't know what I did but it works now! this solution is really good, I hope it's included in the beta builds soon!

mbuist

  • Posts: 252
@mbuist

As of now, I have to say no. I would like to develop extensions for iOS as well, but I am having some troubles with Stencyl/Haxe NME and I'm not the only one here having some difficulties with iOS extensions. There are also some issues when importing libraries so I can do very little until someone helps me tackling these issues. If I can put my hand on a working extension for iOS I can try to figure out how to create an iOS extension. I hope some day I will be able to do it!...

Hmmz to bad. I would love to have this on ios aswell. Id like all advertising in 1 system. And Admob is perfect for it.
Visit my arcade site - http://www.tincubegames.com/
Read all about my games at - http://www.tincubemedia.nl
Please follow Tincube Media on Facebook - http://www.facebook.com/tincubemedia

As a final touch.. GOD created the Dutch

MMWestern

  • Posts: 4
Ive just tried to implement this extension in my android app but due to ADMob recently updating its systems I cant get it to work. Is there a work around for this yet the new publisher ID's dont seem to work?

Abliblablobla

  • *
  • Posts: 524
Hi MMWestern!

Right now I am on a holiday trip in Japan, so I cannot check if this extension still works with Google's new AdMob. I still have to check what's new, but I cannot work on Stencyl here in Japan. I will let you know when I come back home!
.: BuruBuru :.

MMWestern

  • Posts: 4
Thanking You. Ive been away myself so sorry about late reply. I look forward to any help you can give.