Using Google AdMob in CodeName One apps

65 views
Skip to first unread message

adw...@help-an-animal.com

unread,
Feb 7, 2018, 5:23:09 PM2/7/18
to CodenameOne Discussions
We're new to CodeName One and want to use Google AdMob or any other Ad framework to monitize an app with banner ads.

All the posts that we've found so far are circa 2013 and are very terse.

For a new CodeName One user the explanations are almost totally useless.

Can anyone provide a concrete example of using a mobile ad in an app.

FYI: We're developing in IntelliJ with the latest release of CodeName One.
        We have registered and have our keys for AdMob.

        For instructive purposes, we made the Hello World! demo app.
        We tried adding build hints android.googleAdUnitId and ios.googleAdUnitId as mentioned in the old posts, but, nothing happens.

What else do we need to do to include banner ads into the app.

A step by step recipe would be very helpful.

 

Shai Almog

unread,
Feb 8, 2018, 12:21:06 AM2/8/18
to CodenameOne Discussions
Hi,
did you set these build hints through the GUI in Codename One Settings?
If you did this directly in the codenameone_settings.properties you need to add the args prefix like the other build hints.

Based on this issue https://github.com/codenameone/CodenameOne/issues/2297 it seems that this is working.
However, from our experience with developers the banner ad monetization is close to zero. Even for apps with millions of downloads!
Developers that were able to reach positive cashflow used full screen ads which we support via cn1libs (flurry, admob etc.). That's why there isn't much update, very few people use banners.

Gareth Murfin

unread,
Feb 18, 2018, 7:09:57 PM2/18/18
to CodenameOne Discussions

I am not sure if I should butt in here but I developed an "AerServ" lib which supports quite a few ad companies too (way beyond admob), it was made possible by the cn1 guys themselves who helped me with (very) difficult times, and it is quite messy and beta but it did work in a major app (raffler.co.uk) so you may consider it https://github.com/amiga/aerserv-codenameone 

Of course improvements always welcome :) I dont think I supported banners [easy to fix] but it does do interstitials from  Vpodia, Spot exchange, Millenia, Inmobi, Tapit, Vungle, AdColony). It's an experimental lib that (possibly) needs some love, but has proven to work :) Again much love to Shai, Chen & Steve for making anything possible. And demo app here https://github.com/amiga/aerserv-codenameone-testbed

Cheers,
Gaz
Reply all
Reply to author
Forward
0 new messages