Search Unity

[Released] Mobile Ads SDK

Discussion in 'Assets and Asset Store' started by stanislav-osipov, Feb 21, 2014.

  1. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Connect with over a million Google advertisers and show relevant ads in your app.
    Users engage with the ads, you make money.

    $Google Mobile Ads sdk_big cut.png

    Online Documentation | Purchase on Asset Store

    If you have ANY urgent issue, please contact support at stans.assets@gmail.com instead of posting on the forum.
    • I am not always getting forum notifications
    • I can not provide you with updated version here
    • You will get answer and fix much and much faster if you have contacted support directly
    • Getting answer on forums usually takes from 1-3 days
    • Answer from support takes less that 1 day. (in most cases we are answering imitate or in few hours, answer can take up to 48 hours if we are overloaded)

    Supported Platforms:
    • IOS
    • Android
    Supported Banners:
    • Banner (320x50)
    • Smart Banner (adaptive)
    • Full Banner (468x60)
    • Leaderboard (728x90)
    • Medium Rectangle (300x250)
    • Interstitial (full screen)
    Supported Events:
    • ON_AD_LOADED
    • ON_AD_FAILED_LOADING
    • ON_AD_OPENED
    • ON_AD_CLOSED
    • ON_AD_LEFT_APPLICATION
    More Features:
    • Possibility to register test device
    • Targeting using keywords and gender
    • 9 Gravity Options supported
    • Ability to set Custom x,y banner point
    • Source code is open

    How to get support

    Tutorial Videos:
    Sorry, for misspelling and accent. But I hope you will find it useful any way.

    Set Up and Prefab Solution


    Best Coding Practices (Initialisation)


    Best Coding Practices (Interstitial Ad)


    Best Coding Practices (Banners Ad)
     
    Last edited: May 28, 2015
  2. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Hi,

    can you post video tutorial to configure with android device ?

    +++
     
  3. SebastianRSP

    SebastianRSP

    Joined:
    Feb 9, 2014
    Posts:
    2
    I agree :) A video tutorial for android devices would be much appreciated ;D
     
  4. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
  5. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    The video is on the way!)



    Thanks, appreciated!

    It actually support and was tested both systems, so no worries about that.
     
  6. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Hi,

    I have this error when i compile apk:

    +++
     
    Last edited: Mar 8, 2014
  7. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello. That is due to Unity Facebook SDK.
    Please install 32 bit java 1.6 this will solve your problem.
     
  8. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Hi,

    fixed with last jdk 6u45.

    thanks.


    +++
     
  9. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    Hi,

    (I havent bought the asset yet)... been looking through your online doc + admob site.
    i'm still confused about how to get it setup...

    Do i need to post-process everything in X-Code / Eclipse after i compile my unity project?
    I have an Admob account but I don't see the same page as what is shown in the online doc. All i see is a "add site/app" button that request my market URL for the app which i clearly do not have yet as i plan to publish my app with ads already in place.

    as well as, do i need to download the google play SDK? but that only works with eclipse? i'm still very confused on how to get this done from scratch...
     
  10. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Hi,

    Is it possible Ads can be preloaded for later display ?

    if yes, how?

    if no, when is available?

    +++
     
  11. deiong

    deiong

    Joined:
    May 24, 2013
    Posts:
    79
    is this plugin the same ad support as in the android native plugin?? or is it different i bought both android native but doesn't seem to work.. if this one uses the new google play system sdk would get this as well, as long as it works..

    thanks
    Dion
     
    Last edited: Mar 11, 2014
  12. Deleted User

    Deleted User

    Guest

    I get admob running, but don't know how to interact with facebook. I create the facebook app, and sing with the data provided by the plugin. In Unity editor i put the ID of the app. Now, how can i say the app to post in facebook the scores?
     
  13. jsplashapps

    jsplashapps

    Joined:
    Nov 5, 2013
    Posts:
    4
    I keep getting this error and the ads don't show up. The error appears each time the request is made:

    03-15 19:59:02.010 8090-8090/? E/GooglePlayServicesUtil﹕ The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

    Any help is appreciated.
     
  14. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello. Sorry for slow replay guys. I dont always get forum notifications for some reason.

    You good for Android, but for Xcode you should include additional frameworks and linker flags - this is required by google ad mob SDK.

    I have updated docs and tutorial video coming later today, fell fre to drop me an e-mail or post your question here, if you will steel need some clarifications.

    Sure, you can simply set falg ShowOnLoad to false for your created banner.


    The both plugins has the same ad implementation.
    Android Native has more feature for Android
    Google Mobile Ads, has only ad feature + supports IOS.
    If something doesn't work feel free to contact support or describe your problem here.


    All my plugins has one "compatibility platform" to be absolutely compatible with etch other. Unity Facebook SDK is integrated to this platform. So you can use Unity Facebook SDK feature you want, documentation can be found here.


    This message is absolutely harmless, just ignore it. if Ads is not displayed, please contact support with your logcat log attached, or simply post log file here, and I will review it, to find out what goes worn for you.

    P.S. Just quick note, If you have an emergency, that it's much better to contact support by e-mail (We providing e-mail support as fast as possible) instead of forum post, for information and general questions, it's much better to use this thread.
    Support e-mail: stans.assets@gmail.com
     
  15. jingato

    jingato

    Joined:
    Jun 23, 2010
    Posts:
    299
    Hi, I'm integrating this package into a landscape oriented game. Im wondering if it is possible to display the ad on the left side of the screen in a vertical orientation. I am using the AdMobBanner component with a size setting of SMART_BANNER. I tried using all different anchor points but it didn't do what I needed. I really hope this is possible because my game has been designed around the banner being in this position.

    Thanks
     
  16. DanjelRicci

    DanjelRicci

    Joined:
    Mar 8, 2010
    Posts:
    310
    Hello Lacost, I have a problem when using this plugin with iOS, with Interstitial ads.
    Using the sample scene, if I click on "Show Interstitial Ad" or "Load Interstitial Ad", the app crashes and Xcode returns this error:



    (full size: http://i61.tinypic.com/2u6o9wl.png )
    Thanks for the help!
     
  17. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello, The google ad api using device orientation for setting banner horisontal or vertical position. I havent found any official functionality in google ad SDK with will allow to dispay vertical orientated banner on landscape mode. How ever the source code is open as always, and you can try to create some workaround by your self.


    Hello. This is a know issue. Please send e-mail to stans.assets@gmail.com referring this post. And you will get updated plugin version. It already submitted to the assets store and should appear there shortly.
     
  18. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    Hi,

    i got 3 questions...

    1) my game is in potrait, but when i load it, the game loads the unity logo in landscape before entering the game in portrait... where is the place i can change this?

    **SOLVED**
    it's in the android manifest within the plugins directory


    ----------------------------------

    2) the On-banner-load doesn't seem to work... nothing happens... i've tried placing it everywhere (after the init() ... during the Awake() as well as Start() as well as before and after banner.show() etc etc...
    is it broken???

    this is the call i'm using which is identical (ripped) from your demo script...
    //More eventts ot explore under GoogleMobileAdEvents class
    GoogleMobileAd.controller.addEventListener(GoogleMobileAdEvents.ON_BANNER_AD_LOADED, rePositionInfoBar);

    **SOLVED**
    quote original author -> For interstital ads you need to hang listener on admobcontroller, and for banners to hang listener on the banner itself which you created.

    ----------------------------

    3) banner.IsOnScreen returns true even though the ad has not fully loaded and "showing" yet.. is this meant to be? else, is there a way to determine if the banner is actually "showing" ?


    Thanks~!
     
    Last edited: Apr 5, 2014
  19. Pedro11

    Pedro11

    Joined:
    Feb 22, 2014
    Posts:
    5
    Hello i have a problem ! the banner works good but the interstitial doesn't work ,it shows with button to close in the top left and black screen for 1 second and then it reload the whole application .Please i'm stick on this ,Need Help. Thanks
     
  20. Pedro11

    Pedro11

    Joined:
    Feb 22, 2014
    Posts:
    5
    Please someone help me ...
     
  21. deiong

    deiong

    Joined:
    May 24, 2013
    Posts:
    79
    I would like to know how to use the following ON_AD_LOADED and also ON_AD_LEFT_APPLICATION .. can you update the example code to show how to use these events?

    one last question. in my scene a new scene is loaded at a random time. problem is that if the ad banner has not yet shown itself, it will load on the new scene. If the ad banner shows before the new scene is loaded it will close itself. but not when the new scene is loaded before the ad shows itself. how do you get past this??

    thanks :)
     
  22. deiong

    deiong

    Joined:
    May 24, 2013
    Posts:
    79
    well as far as the bottom one goes I put this in the OnDestroy code for the GoogleAdsExample

    void OnDestroy() {
    banner.ShowOnLoad = false;
    banner.Hide();
    }

    works like a charmer :) still looking for help on the events :) thanks
     
  23. deiong

    deiong

    Joined:
    May 24, 2013
    Posts:
    79
    ???

    I would like to know how to use the following ON_AD_LOADED and also ON_AD_LEFT_APPLICATION .. can you update the example code to show how to use these events?
     
  24. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello. Sorry for slow replay.
    Can you specify what events exactly you interesting in? And I will be able to post example for you.
    There is no ON_AD_LOADED and ON_AD_LEFT_APPLICATION events in application. But there is:

    ON_BANNER_AD_LOADED
    ON_BANNER_AD_LEFT_APPLICATION

    and

    ON_INTERSTITIAL_AD_LOADED
    ON_INTERSTITIAL_AD_LEFT_APPLICATION

    Interstitial events should be added to the admob controller. Banner events should be added to the banner instance.
    Cheers!
     
  25. duffyrobert47

    duffyrobert47

    Joined:
    Feb 26, 2014
    Posts:
    6
    Hi, i'm using ur plugin, it work well, however when i want to add event listener, i see it only work with 2 lines code exist on googleAdsExample.cs:
    GoogleMobileAd.controller.addEventListener(GoogleMobileAdEvents.ON_INTERSTITIAL_AD_LOADED, OnInterstisialsLoaded);
    GoogleMobileAd.controller.addEventListener(GoogleMobileAdEvents.ON_INTERSTITIAL_AD_OPENED, OnInterstisialsOpen);

    i tried to add more listener , but it didn't work, i don't know why, can u double check or add it to Google AdsExample.cs ?

    here my code;
    //More eventts ot explore under GoogleMobileAdEvents class
    GoogleMobileAd.controller.addEventListener(GoogleMobileAdEvents.ON_INTERSTITIAL_AD_LOADED, OnInterstisialsLoaded);
    GoogleMobileAd.controller.addEventListener(GoogleMobileAdEvents.ON_INTERSTITIAL_AD_OPENED, OnInterstisialsOpen);
    GoogleMobileAd.controller.addEventListener(GoogleMobileAdEvents.ON_BANNER_AD_LOADED, OnBannerAdLoaded);

    private void OnInterstisialsLoaded() {
    Debug.Log("------------OnInterstisialsLoaded");
    IsInterstisialsAdReady = true;
    }

    private void OnInterstisialsOpen() {
    Debug.Log("------------OnInterstisialsOpen");
    IsInterstisialsAdReady = false;
    }

    private void OnBannerAdLoaded() {
    Debug.Log("------------OnBannerAdLoaded");
    }

    when i read log, i don't see it call to Debug.Log("------------OnBannerAdLoaded");
     
  26. duffyrobert47

    duffyrobert47

    Joined:
    Feb 26, 2014
    Posts:
    6
    ah ok, thank, i made it work

    banner1.addEventListener(GoogleMobileAdEvents.ON_BANNER_AD_LOADED, OnBannerAdLoaded);

    however how can i get size of banner / smartbanner on different device?, ex: with banner is it alway return 350x50? and how about smartbanner too


    and seems that ur google analytics does not work, i tried to use it, i don't see any activity on google reporting site, can u add example that using google analytics, thanks
     
    Last edited: Apr 16, 2014
  27. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    That is no such api unfortunately. Smart banner will always get full device width.
    Size of banner controlled by play service, and it will de not depended from resolution. I mean banner should be for example 3cm length and it will be this size on any resolution.


    What plugin you talking about.
    P.S Analytics as usual taking around 24 to appear
     
  28. Jack62Lewis

    Jack62Lewis

    Joined:
    Jun 17, 2013
    Posts:
    105
    Hi,

    I've been using this awesome asset on my android game for a bit now. It works great. But when I try using it on iOS, I get an error when trying to run my game in Xcode. (First time I've used Xcode and so I know nothing about it by the way except from the fact that it's the only way to test games and build for distribution on iOS)

    I get the error when whilst the plugin is in my project. Meaning I don't need any ads in any of my scenes for the error to occur. And when i remove the plugin, the game runs as normal.

    Here's a screenshot of the errors (There's 6, always 6) if that helps:

    $Screen Shot 2014-04-17 at 15.37.04.png
     
  29. duffyrobert47

    duffyrobert47

    Joined:
    Feb 26, 2014
    Posts:
    6
    Hi, can u add example code to show how to use google analytics in ur plugin?
     
  30. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hey Jack62Lewis , looks like you need to complete IOS set up part. Have a look:
    https://docs.google.com/document/d/...xL2_jpT0Ysq6RxJAM/edit#heading=h.dk56ax4um1xq

    Hey, duffyrobert47. The google analytics i is not the part of the plugin. If you need google anlytics in your game have a look at:

    Android Native (it got analytics for Android only)
    https://www.assetstore.unity3d.com/#/content/10825

    Google Analytics SDK (it got analytics for all platforms)
    https://www.assetstore.unity3d.com/#/content/16317
     
  31. Littlenorwegian

    Littlenorwegian

    Joined:
    Oct 19, 2012
    Posts:
    143
    Hi. Pardon, but I am very much a newbie when it comes to all of this. ^^;

    I've done as specified in the video and I read the log. But nothing, nothing appears when I hit play.
    I opened the example. And even the scene called NoCodingExample. And simply, nothing appears.

    I do get some errors
    https://dl.dropboxusercontent.com/u/11238180/Screenshot 2014-04-20 15.22.20.png

    Please help. I'd appreciate it very much. Very interested having purchased this.
     

    Attached Files:

    Last edited: Apr 20, 2014
  32. Littlenorwegian

    Littlenorwegian

    Joined:
    Oct 19, 2012
    Posts:
    143
    Hello? Still need help.

    I've been trying and trying. Getting a wicked headache in the process.
     
  33. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
  34. Dj_Zuczyslaw

    Dj_Zuczyslaw

    Joined:
    Mar 20, 2014
    Posts:
    31
    Hello, everytime when I build Android app i have got error: "Your Android setup is not correct, See Settings in Facebook menu. UnityEditor.HostView:OnGUI()."

    The build is working, but this error is important ?
    I only use Admob Banner component in my project.

    Greetings!
     
  35. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    not important... the asset comes with facebook twitter integration (and google play i think)... if you are not using it u can ignore it...
     
  36. Dj_Zuczyslaw

    Dj_Zuczyslaw

    Joined:
    Mar 20, 2014
    Posts:
    31
    Thank u for answer :)
     
  37. Littlenorwegian

    Littlenorwegian

    Joined:
    Oct 19, 2012
    Posts:
    143
    Haha, boy do I feel dumb. :B

    It works. That is lovely. Really is. I only have 2 questions. First one is quite a big one.
    $2014-04-24 21.41.28.png
    You can see the banner is huge and covering up vital buttons. I want to adjust the scale of it. Is that possible.

    Also, my app now has a ridiculous set of permissions needed. Billing to Google Play. Access to files. Lots of stuff in there I know my app doesn't require. Any way to adjust this? To set my own permissions for my own app?

    Thank you.
     
  38. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    No Google SDK is controls banner size, you can only choose banner type.

    Sure just modify your AndroidManifest.xml and remove permision you do not need to. All important permissions have comments.
     
  39. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,166
    you said you plan to add Windows Phone 8 support to this plugin. when will you release it? will you increase the price after you add Windows Phone 8 support?
     
  40. ironfiftynine

    ironfiftynine

    Joined:
    Jan 22, 2013
    Posts:
    71
    Good day. I'm looking for a compatible unity package for AdMob and stumbled upon this one. This looks promising but one of my concerns is if this package support Ad Network Mediation? The feature where you can choose which networks top prioritize ad requests through an AdMob account. Thank you and looking forward to your response.
     
  41. Streiner

    Streiner

    Joined:
    May 7, 2014
    Posts:
    2
    Hey Stan!

    Great stuff this!
    Got Admob working but i still have some problems with facebook, could you post a video were you do the facebook integration?

    Want more of your sexy voice! and i rly found the other videos you made helpful to the integration process :D
     
  42. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    I am planing to do this to the end of this moth.
    And yep I guess i will raise the price to 20$ as soon it will be done and tested.


    Will add this to the TODO list and release with next update.
    Thanks.


    :D
    Well, yea, I have to start working on new video I know.
    And I glad it was helpful! Hoping to find someone with good english to help me do those videos )
     
  43. Nezard

    Nezard

    Joined:
    Apr 14, 2013
    Posts:
    12
    Hello.
    I bought it yesterday but 2 errors are occured while building project.
    the errors are as follows.

    Error 1
    Error 2
    (Log of error2 mentions 'See the Console for details.', but this is all. There is no more message.)

    As I am not a professional programer, your help is urgently needed to me.
    I hope that I will receive your reply soon.

    Then, good bye and have a nice day.


    cf.) I am making apps with only Unity3d on IBM PC. Unity is the latest version.
     
  44. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    perhaps check your Android SDK and make sure you have android-14 installed...best to get all android version 8 and above for compatibility reasons... it's a big heavy but saves u the trouble when a package needs a specific version you do not have...
     
  45. Nezard

    Nezard

    Joined:
    Apr 14, 2013
    Posts:
    12
    i've already istalled android api 14.. but the errors are still occured while building..
    is there something else?
    plz help me...
     
  46. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello.
    This one is pretty common issue.
    Please read this documentation part
    https://docs.google.com/document/d/...NYaCYTxXnn4eS4ytY/edit#heading=h.b1d8gg5dem2n

    About the other one, I haven't such report before, but I am pretty sure it connect with the first one, and it will gone as soon as you will fix java problem.
     
  47. Nezard

    Nezard

    Joined:
    Apr 14, 2013
    Posts:
    12
    Thank you for your replies!
    This problem is solved!
    I think It was a problem of java or window..
    I re-installed both of them and it works well!
     
  48. Littlenorwegian

    Littlenorwegian

    Joined:
    Oct 19, 2012
    Posts:
    143
    Hiya. I was wondering, is it possible to just have the thin ad on top. (The one that starts with FIND)
    and not the large square ad? (The one that says Enjoy #BMVstories)

    I've had some users complain about the large, rectangle ad.
     
  49. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello.

    I really glad your problem is solved. That is very common problem with Unity Facebook SDK. Hopefully they will fix this shortly.


    All ad sizes is controlled by goole SDK. We can not change is as developers. We only can set position and one of following ad sizes:
    https://developers.google.com/mobile-ads-sdk/docs/admob/intermediate#play

    Cheers!
     
  50. ironfiftynine

    ironfiftynine

    Joined:
    Jan 22, 2013
    Posts:
    71
    Hello I tested creating a sample banner in my game but I get the following error in my eclipse console.

    Code (csharp):
    1. 05-14 10:07:46.285: I/Unity(14993): AndroidJavaException: java.lang.NoSuchMethodError: no method with name='InitMobileAd' signature='(Ljava/lang/String;)V' in class Lcom/unity3d/player/UnityPlayerNativeActivity;
    2. 05-14 10:07:46.285: I/Unity(14993):   at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <filename unknown>:0
    3. 05-14 10:07:46.285: I/Unity(14993):   at UnityEngine.AndroidJNISafe.GetMethodID (IntPtr obj, System.String name, System.String sig) [0x00000] in <filename unknown>:0
    4. 05-14 10:07:46.285: I/Unity(14993):   at UnityEngine._AndroidJNIHelper.GetMethodID (IntPtr jclass, System.String methodName, System.String signature, Boolean isStatic) [0x00000] in <filename unknown>:0
    5. 05-14 10:07:46.285: I/Unity(14993):   at UnityEngine.AndroidJNIHelper.GetMethodID (IntPtr javaClass, System.String methodName, System.String signature, Boolean isStatic) [0x00000] in <filename unknown>:0
    6. 05-14 10:07:46.285: I/Unity(14993):   at UnityEngine._AndroidJNIHelper.GetMethodID (IntPtr jclass, System.String methodName, System.Object[] args, Boolean isStatic) [0x00000] in <filename unknown>:0
    7. 05-14 10:07:46.285: I/Unity(14993):   at UnityEngine.AndroidJNIHelper.GetMethodID (IntPtr jclass, System.String methodName, System.Object[] args, Boolean isStatic) [0x
    The jar files are in the Plugins/Android/lib folder so I don't understand why the function can't be referenced. Any suggestion on how to fix this? Thank you very much.

    P.S. I installed the google play services unity package before this. We're using the leaderboards and achievements function so I can't remove it.
     
    Last edited: May 14, 2014