Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Ads Interface - Support for AdMob "Rewarded Video Ads" or use another service? — Gideros Forum

Ads Interface - Support for AdMob "Rewarded Video Ads" or use another service?

TheCryptoTheCrypto Member
edited July 2018 in Plugins
Hi everyone, I've been using Gideros for almost 6 years now, it's an excellent framework and I'am very happy how it has been improved over time: big up to the devs! Personally, I've used it only for small games and stuff, nothing worth of being published in the stores, because I've never had the opportunity (and the right idea) for a good game concept.
Btw, some weeks ago that suddenly changed and now I'm finally developing my first game that (hopefully) will reach the stores!

Since I'm planning to insert some Ads and after reading some papers about the performance of various Mobile Ads Services here in Italy (yay, pizza) I decided to go with Google's AdMob banner and video ads.

Now comes the problem: (apparently) in the Ads Interface Plugin that comes with Gideros there is no support for the latter (the video ads).

After some research I also found this discussion AdMob mediation: reward ads but with no further updates about the integration.

Now I've two choices:
* Find a way to implement the AdMob's video ads (or use an implementation that already exists, if so).
* Use another service (which are less popular here in Italy like Vungle or AdColony).

What do you suggest me to do?


Thanks in advance,
Davide

Comments

  • I use "Interstitial" video ads - it works
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • If you look at the admob plugin code then it might not be that hard to add rewards ads - the actual ads plugin system supports rewards.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • hgy29hgy29 Maintainer
    IIRC someone added rewarded videos for admob recently, so it should work

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • TheCryptoTheCrypto Member
    edited June 2018
    I use "Interstitial" video ads - it works
    Yeah, but it's not the same, I was looking for an actual reward video ad.
    If you look at the admob plugin code then it might not be that hard to add rewards ads - the actual ads plugin system supports rewards.
    Yep, I know that it won't be that difficult but I thought it was already implemented in some way. (Which it is)
    IIRC someone added rewarded videos for admob recently, so it should work
    That's great! In fact after some digging in the java source of the Ads plugin I found the "rewarded" adType.. and IT WORKS!

    Here's the test code if someone in the future will face this problem again:
    require "ads"
    admob=Ads.new("admob")
    -- AdMob's testing key
    admob:setKey("ca-app-pub-3940256099942544/1033173712")
     
    -- Let's load the video Ad with the testing UnitId that Google provides us for test purposes
    admob:loadAd("rewarded", "ca-app-pub-3940256099942544/5224354917") 
     
    -- Some debug events.. just in case something goes wrong
    admob:addEventListener(Event.AD_DISPLAYED, function (event) 
    	print("AD_DISPLAYED. AD_TYPE: " .. event.type)
    end)
     
    admob:addEventListener(Event.AD_ERROR, function (event) 
    	print("AD_ERROR. AD_TYPE: " .. event.type .. " Error: " .. event.error)
    end)
     
    admob:addEventListener(Event.AD_FAILED, function (event) 
    	print("AD_FAILED. AD_TYPE: " .. event.type .. " Error: " .. event.error)
    end)
     
    admob:addEventListener(Event.AD_RECEIVED, function (event) 
    	print("AD_RECEIVED. AD_TYPE: " .. event.type)
    	if(event.type=="rewarded")then
    		print("Video loaded, showing it.")
    		admob:showAd("rewarded", "ca-app-pub-3940256099942544/5224354917")
    	end
    end)
     
    admob:addEventListener(Event.AD_DISMISSED, function (event) 
    	print("AD_DISMISSED. AD_TYPE: " .. event.type)
    	if(event.type=="rewarded")then
    		print("Video dismissed.")
    	end
    end)
     
    admob:addEventListener(Event.AD_REWARDED, function (event) 
    	print("AD_REWARDED. AD_TYPE: " .. event.type)
    	if(event.type=="rewarded")then
    		print("Video rewarded, yay!")
    	end
    end)
    The documentation should be updated too.

    Thanks to everyone!
    +1 -1 (+9 / -0 )Share on Facebook
  • antixantix Member
    So the documentation hasn't been updated?
  • So what is the reward callback? I mean how do we know that the user actually saw the ad till the end?
  • dreiko65 said:

    So what is the reward callback? I mean how do we know that the user actually saw the ad till the end?

    When the rewarded ad is closed, regardless of the result, Event.AD_DISMISSED is fired.
    When it's closed and rewarded Event.AD_REWARDED (in addition to the AD_DISMISSED event) is fired.

    I'm updating the example code above too.
  • antixantix Member
    Was the plugin updated to handle Rewarded Video? When I add the plugin to my project and go to it's properties.. there is no field to put my admob rewarded video key.
  • antix said:

    Was the plugin updated to handle Rewarded Video? When I add the plugin to my project and go to it's properties.. there is no field to put my admob rewarded video key.

    Just follow my example code above, the rewarded video key is set when I need to load the ad:
    -- Let's load the video Ad with the testing UnitId that Google provides us for test purposes
    admob:loadAd("rewarded", "ca-app-pub-3940256099942544/5224354917")
    And then, when it's done loading, I show it:
    admob:addEventListener(Event.AD_RECEIVED, function (event) 
    	print("AD_RECEIVED. AD_TYPE: " .. event.type)
    	if(event.type=="rewarded")then
    		print("Video loaded, showing it.")
    		admob:showAd("rewarded", "ca-app-pub-3940256099942544/5224354917")
    	end
    end)

    Likes: Apollo14, antix

    +1 -1 (+2 / -0 )Share on Facebook
  • antixantix Member
    @TheCrypto thanks, I got it working.. until admob banned my account for looking at rewarded video adverts in my own damn game :D
  • antix said:

    @TheCrypto thanks, I got it working.. until admob banned my account for looking at rewarded video adverts in my own damn game :D

    require "ads"
    admob=Ads.new("admob")
    admob:enableTesting(true)

    Likes: MoKaLux

    > Newcomers roadmap: from where to start learning Gideros
    "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
    “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
    +1 -1 (+1 / -0 )Share on Facebook
  • TheCryptoTheCrypto Member
    edited July 2018
    antix said:

    @TheCrypto thanks, I got it working.. until admob banned my account for looking at rewarded video adverts in my own damn game :D

    You should always use the test unitId provided by Google when developing an app, otherwise you'll risk being banned for improper use.
    Apollo14 said:

    antix said:

    @TheCrypto thanks, I got it working.. until admob banned my account for looking at rewarded video adverts in my own damn game :D

    require "ads"
    admob=Ads.new("admob")
    admob:enableTesting(true)
    I don't think this is enough since AdMob requires a specific unitId for each ad you wanna show. (Better be safe than sorry)

    Here you can find all the testing unitId(s) provided by Google: https://developers.google.com/admob/android/test-ads

    Likes: totebo

    +1 -1 (+1 / -0 )Share on Facebook
  • totebototebo Member
    That's great info @TheCrypto, hadn't seen the test unitIDs before.
    My Gideros games: www.totebo.com
    +1 -1 (+2 / -0 )Share on Facebook
  • SinisterSoftSinisterSoft Maintainer
    Same here. I may try admob now. :)
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • totebototebo Member
    Admob is the best (and only?) network for banners. Also pretty good for rewarded ads.
    My Gideros games: www.totebo.com
  • antixantix Member
    @TheCrypto thanks for the links. My account is suspended so I won't bother. As I said previously I won't use admob again if I can't even play my own games LOL
  • SinisterSoftSinisterSoft Maintainer
    If you add facebook or play login then check for your id in the code - if you then go into test mode - then you can release a game and also play it yourself.

    Likes: Apollo14, MoKaLux

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+2 / -0 )Share on Facebook
  • olegoleg Member
    TheCrypto said:



    I don't think this is enough since AdMob requires a specific unitId for each ad you wanna show. (Better be safe than sorry)

    It's enough

    if you add
    admob: enableTesting (true)
    The admob will not hit the advertisement, but the test banner
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
Sign In or Register to comment.