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

Abliblablobla

  • *
  • Posts: 524



AdMob Extension

Hello Everyone!
I'm very happy to share a new AdMob extension! From now on, you will be able to monetize your Android games and applications using AdMob banner advertisement.

Features:

- AdMob banner ads: feel free to place them on the top or on the bottom of the screen, in landscape or portrait. Chose between 6 (six!) positions!

- Simple to use: show and hide the banner whenever you want with a single block, so that you don't have to redesign scenes to place a banner;

- Seamless integration: the extension shares the same blocks previously used by AdWhirl!

I have just created a Beginner's Guide that covers everything a beginner should know about Admob and its integration in Stencyl. Feel free to tell me if there are errors and if you need a more clear guide. Read this guide to understand how to implement ads in your game!

Now I need you help! Help me test if this extension is working as it should and feel free to share your opinions!

I would also like to say that you shouldn't expect to become rich with AdMob: if you have a great game in your hands, it makes almost no difference if you use AdMob or you sell your game. My opinion is that AdMob is a great chance to get noticed (free downloads can be 10~100 times paid downloads!) while making some revenue. Once you get noticed you will be able to cross-promote your games to multiply downloads!

A big thank you to runimals for sharing his (her?) experience!

Downloads (see attachments):
- ADMOB ADVERTISING for the Beginner's Guide;
- AdMob Test.zip for a sample test app (game folder);
- ads.zip for the extension.

Thank you for reading this post!

Known Issues:
- When you close and reopen your application, the advertisement banner disappears and won't show up again. Third party? Still investigating...

Changelog:
[April 16th] New Version! (v1.1)
 - [New!] You can now download a sample a test app;
 - [New Feature!] Now you can place the banner in six different positions (Bottom-Center/Left/Right and Top-Center/Left/Right);
 - [New Feature!] Now you can initialize AdMob whenever you want;
 - [Change] This extension isn't using the AdWhirl Setting page for configuration (it may be confusing);
 - [Change] The Beginner's Guide (Chapter 5: Configure "Ads Extension") has been updated for v1.1;
 - [Change] The Beginner's Guide has a new Chapter: Tips & Tricks;
 - [Change] The Beginner's Guide has a new Chapter: Sample Test App;
 - [Fix] Banner position was always Bottom.

« Last Edit: April 16, 2013, 06:22:13 am by Abliblablobla »
.: BuruBuru :.

JensWinterstein

  • *
  • Posts: 433
How awesome of you! :D
I'm gonna try it out and report back.

EDIT: Works exactly as described by you in the PDF file (screenshot attached).
It's only a little confusing with the Publisher ID inside the Adwhirl field.

Also, the ad won't show up again after closing and re-opening a game (not force stopping, just holding it in memory).

« Last Edit: April 11, 2013, 07:07:01 pm by JensWinterstein »
Get 100 Chambers for Android / iOS
Get Cubus Velox for Android / iOS or play it on Flash

- Portfolio


8fifty2

  • Posts: 128
I can be a bit of a novice at times but your instructions were easy to follow. I now have ads appearing on my game. So thank you for that!

I am using the show and hide functions and they work a treat however the only thing not working was the setting of ads at the top. Despite me saying display at the top they persist with the bottom.

Congrats and thanks any how.

https://play.google.com/store/apps/details?id=com.fiddy.piggylitehd

Abliblablobla

  • *
  • Posts: 524
Thank you for your feedback!

@ JensWinterstein
I couldn't reproduce the issue you are having... If I understand correctly, the ads banner won't show up again after closing and opening your game again. For example you press your home button while you are playing and reopen it after checking emails, but when you reopen your game you cannot see the ads banner anymore. Is it correct? If so, it is really strange since this isn't happening on my device...
May I ask you more details about the issue? Is this happening every time you close and reopen your game? Before you close your game, is the banner showing up or did you hide it?

@ 8fifty2
Thank you for reporting your experience! I think I found the problem but since I have to study (I am still attending highschool) I am not able to tackle this issue until Monday or Tuesday. As of now, ads banner will show up only at the bottom of the screen.

For everyone who is testing this extension, please write here what device you are using and which version of Android is running on the device.

Thank you!
.: BuruBuru :.

JensWinterstein

  • *
  • Posts: 433
I couldn't reproduce the issue you are having... If I understand correctly, the ads banner won't show up again after closing and opening your game again. For example you press your home button while you are playing and reopen it after checking emails, but when you reopen your game you cannot see the ads banner anymore. Is it correct? If so, it is really strange since this isn't happening on my device...

May I ask you more details about the issue? Is this happening every time you close and reopen your game? Before you close your game, is the banner showing up or did you hide it?

It's exactly as described by you. I'm running Android 4.1.2 on a Google Nexus S.

I didn't use the "show/hide ad" blocks at all (which could be the error - do I need to execute "show ad" at least once maybe?). As soon as I press the home button and return to the game, the ad banner won't show up anymore - no matter how often I close and re-open the game.

This is not the case if the ad code is hacked directly into Gameactivity.java (as described by runimals).
Get 100 Chambers for Android / iOS
Get Cubus Velox for Android / iOS or play it on Flash

- Portfolio

8fifty2

  • Posts: 128
No problem.

I'd rather have ads in the wrong places then none at all.

Just as a heads up I too have noticed that if you close the game and reopen then my ads wont reload either. Its not a deal breaker though.

I tested on a Sony play and a Sony tab s1

FranAlt

  • Posts: 169
Im using Stencyl's native integration of AdWhirl and the ads disappear when you close the game and open it again. I don't think its an issue with this integration, it surely has something to do with AdMob. I have a black banner for when the ads are not loaded.

I can confirm that your integration also works (I had no problem with Stencyl's one). Landscape game, ads set to the bottom, Samsung Galaxy SII. Nice work ;)

« Last Edit: April 13, 2013, 11:19:11 am by FraAlt »
Swipe - FREE          Cloud Run - FREE              
                                  
         iOS                                Android
    Android

Abliblablobla

  • *
  • Posts: 524
@ FraAlt

That is strange... A lot of people asked how to implement AdWhirl in Stencyl because they weren't able to make it show ads of any kind. I tried to test AdWhirl with Stencyl using devices running Android 4.0.4, 4.1.2 and 4.2.2 but there were no ads in my test applications, so I thought that AdWhirl implementation was simply broken. Now you are writing that AdWhirl does work in your game and this sounds very strange to me. May I ask you which Android version is running on your Galaxy SII? Is it Android 2.3.x? If so, the problem with AdWhirl implementation could be the AdWhirl SDK (actually the one used within Stencyl is a bit outdated) itself which seems not to support Android 4.x.
Thank you for sharing your experience. I had no time to investigate the issue of the disappearing banner: I will try to reproduce the issue when I have some spare time (next week).

@ 8fifty2
Could you tell me which Android version is running on your devices (I suppose 2.3.7 on your Sony Play and 4.0.4 on your Sony Tablet S (1), but I am not sure...)

Thank you!
.: BuruBuru :.

mbuist

  • Posts: 252
Not working on my devices. I even created a new project and tried it again

All devices are running on android 4. Got a galaxcy tab 2 10.1 and a bricked galaxy S plus phone  (running cyanogamod 9 android 4)

I am going to get the original android version back on the phone. thats android 2.2/ If it is working then . Then at least we know where to find the problem

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

8fifty2

  • Posts: 128
@ Abliblablobla
Great guessing, spot on.

FranAlt

  • Posts: 169
Thats right, I have a Samsung Galaxy SII with 2.3.6. It surely has something to do with do with the Android version. When I tried in a newer version of Android in a Samsung Galaxy SII I didn't get any ads, the same happened when I asked to people of other countries if they could see the ads, they replied 'no ads...'. I do get tons of requests and impressions (Which is odd because the ads are not appearing) I attached an image to show my AdMob screen, the app above (Cloud Run Testing) is with your integration and the one below (Cloud Run Android) is with Stencyl's integration via AdWhirl.

I used your implementation in a version I released yesterday, so if someone can test it out and tell me if they get ads that would be nice  ;)

Note: In 'Testing' the eCPM and RPM are high and the requests are low because It wasn't a public released version and I testing clicked on my ads, don't take those values as a guide, just know its working.

« Last Edit: April 14, 2013, 08:19:56 am by FraAlt »
Swipe - FREE          Cloud Run - FREE              
                                  
         iOS                                Android
    Android

runimals

  • Posts: 215
Many thanks for this @Abliblablobla, you saved me some integration work creating the extension  :P

It will be really helpful if we could create in Stencyl some custom config menus for the extensions.
Jon should think about this. Maybe an Options button for each extension where you could fill some string/number variables, like the behaviors.
This way, all the configuration steps would be easier for the "non-programmer" user.

I'm now working in another great extension. Stay tuned.

Abliblablobla

  • *
  • Posts: 524
Hello everyone!

The extension and the guide has been updated to v1.1 and there is also a sample app to download so everyone can understand better how to implement AdMob in their games. Please use this sample test app to report any bug!

As promised I fixed the banner position bug, but this is only a small part of what's new in this release! See the Change Log in the first post to see all the new features and changes!

Implementation changed slightly in this release, so please download the beginner's guide again to see how to implement AdMob in the right way.

Feel free to share your opinions and report bugs!

« Last Edit: April 16, 2013, 04:55:29 am by Abliblablobla »
.: BuruBuru :.

Ninjadoodle

  • Posts: 313
I've just started playing with Android and I am completely new to this mobile thing :)

Can I test whether the ads work if I'm just testing a game on my Android device from Stencyl?

It's not in the store yet, so I'm not sure whether it's possible.

I've tried "Test Game" with the Ads.initAdMod... line (with my id) and the game just hangs on compiling.

If I take this line out, the game compiles no prob.

I'm pretty sure, it's something I'm doing wrong lol.

Thank you in advance for any help and for the great extension!
It's all fun and games until somebody get's a shuriken in their eye!