Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
[TUTO] Video tutorial - How to add Admob plugin to your app — Gideros Forum

[TUTO] Video tutorial - How to add Admob plugin to your app

jeromegsqjeromegsq Member
edited June 2015 in Step by step tutorials
Hello,

I made a little tutorial to show everybody how to add ads to their application.
I made this because the first time I wanted to add a plugin, I had a lot of bugs and problems



I hope that will help lot of people :)

+1 -1 (+8 / -0 )Share on Facebook

Comments

  • Wow thank you very nice tutorial help me a lot :)

    Likes: jeromegsq

    +1 -1 (+1 / -0 )Share on Facebook
  • Great set of tutorials, really appreciated =D>
  • This is excellent!

    Please keep making them. The tech side of things is tricky for a lot of people (like me!)

    Likes: jeromegsq

    +1 -1 (+1 / -0 )Share on Facebook
  • antixantix Member
    While I wait for somebody to hopefully help me with my continuing Google Play Services problems I thought I would have a quick play with Eclipse and see if I could get a simple test of adMob working. I found this thread and am following the accompanying video.

    Maybe I'm just stupid but around 304 seconds into thie video @jeromegsq imports two things, his test project, and something called "google-play-services_lib". After searching my hard drive I located that hidden away in "C:\Gideros\All Plugins\ads\dependency\android\google-play-services_lib"

    So I copied that to the workspace folder and went to import them again but only my project exported from Gideros Studio is visible, the google folder isn't even listed.

    What gives? How do I magically get this other thing to materialize inside Eclipse?
  • antixantix Member
    edited July 2016
    @hgy29, thanks. Import > select Android > Existing Android Code allowed me to select the "google-play-services_lib" from the workspace folder. I don't know why the method shown in the video doesn't work.

    In the video @jeromegsq copies and pastes some text from the page at http://docs.giderosmobile.com/interface/ads into his manifest. The stuff he pastes is..
    <!-- google play -->
    <meta-data android:name="com.google.android.gms.version" android:value="<a href="http://forum.giderosmobile.com/profile/integer%2Fgoogle_play_services_version%26quot" rel="nofollow">@integer/google_play_services_version&quot</a>; />
    <activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
    If I run the project then I get an error..
    I/Ads(21213): Please set theme of AdActivity to <a href="http://forum.giderosmobile.com/profile/android" rel="nofollow">@android</a>:style/Theme.Translucent to enable transparent background interstitial ad.
    The solution was to change the text to..
    <!-- google play -->
    <meta-data android:name="com.google.android.gms.version" android:value="<a href="http://forum.giderosmobile.com/profile/integer%2Fgoogle_play_services_version%26quot" rel="nofollow">@integer/google_play_services_version&quot</a>; />
    <activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:theme="<a href="http://forum.giderosmobile.com/profile/android" rel="nofollow">@android</a>:style/Theme.Translucent" />
    Maybe the website can be updated to have that corrected.

    Now I have it working but I am not receiving the result I expect. In my test app I want to reward the user for watching a video advert. The advert plays but my app always receives the AD_DISMISSED event, even after I watch the entire advert and install the app it is advertising.
  • antixantix Member
    So I am just going to assume that Gideros doesn't support reward video adverts using admob. Any idea when this plugin might be dragged into the 21st century?
  • simwhisimwhi Member
    @antix You're are correct. The current admob plugin does not support reward ads. We would also like to use this at some point in the future. In the meantime we have used Applovin for our reward ads. To be honest, we have not seen a great deal of revenue from reward ads. This may be because of the way we have implemented it within our previous game. However, in our latest game there are more opportunities for users to watch reward ads. So, this may change!!
  • antixantix Member
    edited July 2016
    @simwhi thanks. Well my idea is a bit like crossy road where a player can watch a video and be rewarded with a token that enables them to spin the prize wheel (and maybe unlock a new character). I have no idea if crossy road makes money this way (and I don't care if I don't make any money from it) but it's something I want in my game. I'm really not keen on resorting to spamming banner ads at players as I hate that myself.

    I suppose I will have to give Applovin a try at some stage.

    However, I still can't get any plugins working with my game. I can't even export from the latest version of Gideros without it crashing.
  • simwhisimwhi Member
    @antix Wow! I didn't realise that you have some many issues. What's up with the export?

    Advertising is a necessary evil. We don't care for it either, but it does provide us with income. Banners seem to perform OK for us, but they are a pain in terms of UI design.

    By the way we released our app. We haven't started promoting it yet though.

    https://play.google.com/store/apps/details?id=com.wobblemonkey.speedygram


  • antixantix Member
    @simwhi, with the new version of Gideros installed, if I go to export to android Studio (didn't test others) some process named "luac.exe" crashes repeatedly. I've uninstalled it and the previous version works fine.

    Checked out your app, very cool. Do people have to click on the banners for you to make money? and what kind of revenue do they generate, I mean, are they worth including?
  • antixantix Member
    @antix: look at this https://developers.google.com/android/guides/setup, under Eclipse ADT tab
    Just thought I would clarify this. This stuff no longer exists in the Android SDK. Furthermore, If you click on the support link it just tells you not to use Eclipse and to use Android Studio.
  • hgy29hgy29 Maintainer
    @antix, yes Eclipse seems deprecated for building android stuff, so we'll focus on Android Studio in the future. Even plugin integration is easier on Android Studio, so we decided not to bother too much trying to make it work for Eclipse.
    I'll try to change APK creation so that it uses Android studio instead of eclipse based template too.

    So newest luac.exe crashes for you ? it has been updated in 2016.6 so that it can generate a cross platform lua bytecode. Can you tell use more about the crash ? Since it processes lua files, does it work for some files and not for others ?

    Likes: simwhi

    +1 -1 (+1 / -0 )Share on Facebook
  • simwhisimwhi Member
    @hgy29 This is going to be great. I used eclipse when I first started using Gideros, but I have moved over to Android Studio now. I really think it is much easier to integrate plugins.
  • antixantix Member
    @hgy29, I tried 3 random projects of my own and all the examples from the first example page. all caused luac.exe to crash. I posted a screenshot in the actual latest release thread. If you need me to do more let me know and I can reinstall the latest version.
  • antixantix Member
    So with plugins like this one that does not support features you would expect it to.. Does there need to be any plugin building happen or can the functionality just be edited in the Java files (as @hgy29 did for the achievement stuff that wasn't working)?
Sign In or Register to comment.