Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Ads Interface - Page 6 — Gideros Forum

Ads Interface



  • chipster123chipster123 Member
    edited November 2013
    I'm trying to integrate AdsInterface http://docs.giderosmobile.com/interface/ads
    for the first time on Android and I don't know how to provide the information for
    import import com.yourdomain.yourapp.R; in your main activity
    I replaced the com.yourdomain.yourapp with my info (com.kosidoss.doumbek1), but I don't know how to define the .R part. I never understood this part of the Java project.
    I'm getting the error
    The import com.kosidoss cannot be resolved
    Then, of course, it goes on to fail later on
    What did I miss?

    UPDATE: So I closed up Eclipse and took the dogs outside. When I came back in I thought I'd try read more about it and try it again and the error went away. Looks like it built the R class on initialization of the project. Now on to debugging the SIGSEGV during startup. I haven't added the Lua code yet to call on anything so I wasn't expecting this yet.

    UPDATE2: The last line in the Code Example doc is
    and should be
    UPDATE3: Yay! the ad displays. Now I have to rotate the banner for the landscape orientation. Anyone with examples?
  • @chipster123 yes you need to clean and then build the project, that will generate the R resource from your files in the project and error will go away

    And thank you for correction, fixed it ;)
  • @ar2rsawseen
    Any progress on Ads Interface for iOS's vungle, revmob and friend?
  • yes well unfortunately with the increased number of paid members, there is also the increased number of support needs to be provided, so planned things can get out of hands :)
    But hopefully I'll be done with IOS versions this week ;)

    Likes: chipster123

    +1 -1 (+1 / -0 )Share on Facebook
  • Ads Interface works in a special build of the player with Logical Dimensions 320x480 and "landscape" set in the Android manifest. My project declares 768x1024, but playing it on the player built for the device, the ads show up. When the project is exported and built as a complete apk, with all the same changes to manifest and libs added and src added the same as I did with the player, I get this error in "logcat" and the ad banner is blank
    I/Ads     (21724): onReceiveAd()
    E/Ads     (21724): Not enough space to show ad! Wants: <720, 100>, Has: <488, 564>
    Any ideas?
  • Hmm, where exactly does the problem start?
    If you add assets to the working Gideros Player, does it still work correctly? (you can simply copy assets folder from exported project, to the Gideros player you have working)

    Or vice versa, if you delete assets from exported project, does it work normally as Gideros player?

    Basically need to understand, if that is the problem between different project or between different stages of the app (Gideros Player, full project and exported apk file)
  • Narrowed the problem down to calling :setPosition(x,y) on the ad.
    ad:setPosition(0,0) worked, but ad:setPosition(0, y) fails for values of y that I thought should work.

    Doing more investigation. Is there an automatic way to place the ads at the bottom of the screen when in Landscape mode?

  • @chipster123
    the interesting part is why there is a difference

    You can also use setAlignment:

    Ads:setAlignment(horizontal, vertical) --set add alignment if possible

    like this:
    ads:setAlignment("center", "bottom")
  • chipster123chipster123 Member
    edited November 2013
    @ar2rsawseen, thanks for the set alignment details. I'll try it soon.
  • @ar2rsawseen,
    ads:setAlignment("center", "bottom")
    works perfectly! Thanks.

  • I'd like to see Tap for Tap. I created a GitHub of a plugin I made using your tutorial. I had no idea you were working on this (guess I need to be more active in the forums). Anyway, this ad interface will be incredibly useful!
  • Sure, I can probably reuse something from your class to add it :)

    Also I posted a little explanation on how to add frameworks to Ads interface here:
  • tkhnomantkhnoman Member
    edited November 2013
    PING! @ar2rsawseen for the next version. :-h

    Oh yeah, will you add AdMob with Google Play Service (the one that need migration) in the future?

    Well, just asking, i didn't use Google Play Service, just tried once and realize how troublesome it was for AdMob.
  • ar2rsawseenar2rsawseen Maintainer
    edited November 2013
    I know I know, actually made a huge progress yesterday. While Objective-C is killing me, I learn lots of new stuff. Like auto accessors for properties, or difference between UIDeviceOrientation and UIInterfaceOrientation.
    Each step is bugging me for a while, until I resolve it and move onto next one, this time rewriting the Ads Interface from scratch but doing it the right way :)

    About AdMob and Play services integration, the migration itself seems quite easy, but I would delay doing it, because Google Play service lib is not something I could bundle with the Ads Interface and it would most probably have to be set up by the end developers themselves (which I try to avoid).

    I will experiment and see if it is possible to extract the Ads bit from Google Play Services to bundle it alone :)

    But thank you for raising this point, will definitely look into it after IOS interface ;)
  • And I finished porting all existing interfaces on rewrited AdsInterface for IOS, tomorrow will start adding Mopub, Revmob, Vungle and Samsung AdHub to IOS ;)
    +1 -1 (+1 / -0 )Share on Facebook
  • And Updated AdsInterface:

    It is now marked as stable, but you can check the status of separate Ad frameworks (as also docs) here:

    version 1.0
    Fixed issues with IOS interface
    Added Mopub, Revmob, Vungle and SamsungAdhub ios support
    Samsung added optional inventory ID
    Samsung Android renamed banners to match iOS
    Updated Gideros example project
    Updated AdsInterface docs

    There is currently only one issue, on iOS there is a linkage conflict between Samsung and Tapjoy, so unfortunately most probably you won't be able to use them both in one project.

    And yes as interface are added, the size of the plugin is becoming huge, so never leave all interfaces in your app, only leave the files for the ones, that you are really interested in using.
    Which files correspond to which ad framework you can also see here:

    So now I can start accepting requests on new Ad Networks to be added, and as usually if there are any issues with existing ones, please let me know ;)
    +1 -1 (+2 / -0 )Share on Facebook
  • tkhnomantkhnoman Member
    edited December 2013
    Great! Thanks. ;)

    And about the frameworks, what about let user download from corresponding one. Lately chartboost updated it's SDK for Android, but i can see that in here, it is not yet updated.

    But well, for ease of use, people might want it to be together.

    EDIT : The frameworks for iOS is broken, in the end i need to download from the site. But i still wonder if it's just me. (It happened before to me when i try to unzip the framework at Windows, but in this case, it is broken even if i unzip it at Mac)
  • About newer SDKs, in most cases you can download them yourselves and simply replace the existing one. If it won't work/build then you can ping me and I will update the Interface, because it is very hard to manage all the updates (where what gets updated) :)

    About broken frameworks, thats interesting, I've simply downloaded them and added to my xcode project when developing AdsInterface for iOS, then I simply copied everything into the labs.

    So there should be no different.

    Maybe it is this issue:
  • Nope, the things that is broken is that what inside the framework itself (can be checked via finder) The headers etc become a file without extension.
  • ar2rsawseenar2rsawseen Maintainer
    edited December 2013
    @tkhnoman, ok then it can be explained by the fact that I load them to windows to commit to the repo and then zip to Gideros Labs.

    Only I have no idea, why they break when going through Windows, anyone has any ideas?
  • Did anyone test Chartboost on android? My game worked fine with Admob and Heyzap, however it did not show Chartboost's interstitial. When I click more app, the game crashed.
  • edited December 2013
    @ar2rsawseen: yes, I've just downloaded it.

    More information:
    - I am using Gideros v2013.09.1
    - Chartboost ingteration status is still showing FALSE.
  • @thanhquan1512 oh sorry and is it iOS crash or Android?
    And is there anything in the logs?
  • edited December 2013
    @ar2rsawseen: it is crashed on Android, I haven't tested on iOS yet.

    I only tested on real device and BlueStacks, I will send logs tonight for further investigation :)

    Update: integration and ads are ok now, only More Apps has problem.
  • I've fixed the ios frameworks and updated chartboost SDK.
    Unfortunately @thanhquan1512 I could not reproduce your problem, because the moreapps call only contains single call to chartboost sdk, so I would need to ask for your logs, if the issue still persists with the updated chartboost sdk ;)
  • I've finally moved on to building the iOS version of the same app I was working on at the beginning of this thread but can't get the ads in Landscape mode.

    Testing on iPad (iOS 6.1.3, XCode 4.6.2)
    The project is set for Landscape-Left and I tried the following:
    1. XCode project has only Landscale-Left selected - the app crashes
    2. XCode allows Portrait too, but the banner ads display as if they are Portrait (on right side of screen and sideways).

    I'm searching this forum and Google, but haven't found anything yet. Any ideas?
  • @chipster123 is it for Gideros Player or the your app?
    Because I think when using project as Gideros player it may only work in Portrait mode, otherwise it crashes.
  • chipster123chipster123 Member
    edited January 2014
    @ar2rsawseen, I compiled the app file. (I haven't made a recent iOS player yet)
    So, I'm still having trouble. The ads are sideways for my LANDSCAPE_LEFT iOS build.

    I see that the original iAd plugin had control of landscape during construction
    banner = iad.Banner.new(iad.Banner.TOP, iad.Banner.LANDSCAPE)
    But how do I do that with the Ads Interface?
Sign In or Register to comment.