Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[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
    Hello. You have problems with plugin installation.

    in class Lcom/unity3d/player/UnityPlayerNativeActivity;

    It means that main class is not override.
    Make sure you didn't move any files from Plugins folder, and you using AndroidManifest you got wit the plugin
     
  2. ironfiftynine

    ironfiftynine

    Joined:
    Jan 22, 2013
    Posts:
    71
    I installed the google play services unity package before this. We're using the leaderboards and achievements function so I can't remove it. Do you think it will cause some conflicts with your plugin? And I'm using your manifest by the way.
     
  3. ironfiftynine

    ironfiftynine

    Joined:
    Jan 22, 2013
    Posts:
    71
    Finally made it work. I deleted all the involved files and reinstalled again. Thank you for the assistance.
     
  4. SIV

    SIV

    Joined:
    May 7, 2014
    Posts:
    219
    Hello,
    Building for ios is really hard, please do a video with the current version of xcode to show how to do the steps you mentioned on your doc.

    Thank you
     
  5. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Sure, no problem!
    And any way if you have any difficulties just drop e-mail to support team: stans.assets@gmail.com
     
  6. SIV

    SIV

    Joined:
    May 7, 2014
    Posts:
    219
    Hello,
    It have been 2 days waiting for you to replay on my email, please help me solve the problem.
     
  7. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,152
    how is going Windows Phone 8 integration? i bought your mobile ads and integrated it to ios. google banner sizes behave different on ios. it looks it does not use density. it looks smaller on my ipad 2 than on my note 3.
     
  8. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Really soryy about this.
    Currently I do not see unsolved issue on e-mail. Please PM me if your issue steel not solved, I will do this ASAP personally !

    It's coming WP8 native first release will be submitted this week,

    This is entrusting observation, but plugin size is controlled by google SDK.
    But your feature request implemented, and now its posible to find out banner pixel size.
     
  9. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,152
    Do you mean you will release "WP8 native plugin" and it will include google mobile ads feature? what i need is to show google ads on windows phone 8.
     
  10. Sandro-Herbst

    Sandro-Herbst

    Joined:
    May 6, 2014
    Posts:
    1
    Hi Lacost,

    I´ve bought your component and I´m having trouble in Android when no connection available... could you please help solve this problem?

    Thanks
     
  11. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    WP8 Native will not have google ads feature. It will have native ads in future.
    I will extend Google Mobile SDK plugin to support google ad on WP8 as well.

    Hello. Sure, but can you please describe what you mean by this?
    I assume you talking about when you do not have internet connection, and you trying to use play service? Could you describe what problems you having?
    Thanks.
     
  12. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,152
    can you add an info inspector get the installed version of this plugin like you did for ios and android native?
     
  13. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,152
    it works on android. i tested it with samsung note 3 and asus tablet. on ios it worked on ipad 2. i tried the same project on iphone 4. i cannot see banner. at log it says "Received ad successfully" several times. i create banner at 137, 539 and 320,588 on different scenes. on ipad 132,652 works fine. is there any differences between iphone and ipad to show banners?

    Edit: there is density factor at ios. for iphone density is 2, for ipad 2 it is 1. :) by adding this fixed density values i can see it now. for other resolutions i had to find density values.

    on iphone4 when i try to place my ad to (100,100) it place it to (200,200) it uses also density for coordinates not just for dimension.
     
    Last edited: May 26, 2014
  14. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Yep, I will!

    I glad you found the solution.
    As you see your feature request of implementing density was really helpful!
     
  15. XCO

    XCO

    Joined:
    Nov 17, 2012
    Posts:
    379
    Sorry for the naive question, but, i currently have IAD in my Iphone/IPAD games.. I didn't relaly realize I could put this in there also.

    Could I use this with IOS Native, and say put In a IAD Function and if it fails load this instead ?

    Thanx... :D
     
  16. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Sure, you can do this :)
     
  17. Stans-Assets

    Stans-Assets

    Joined:
    Jun 20, 2014
    Posts:
    57
  18. PeterShoferistov

    PeterShoferistov

    Joined:
    Sep 22, 2013
    Posts:
    59
    Is there any progress on this?
     
  19. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Yep, should be done by the end of this week.
     
  20. theHoboBob

    theHoboBob

    Joined:
    Apr 10, 2014
    Posts:
    3
    Hello,

    I've got the IOSNative and the Google Moblie Ads SDK plugins, and was wondering if there was a simple way to have AdMob load a banner ad if iAd failed to load an ad. I'm new to the scripting side of this, so I'm learning as I go.

    Thanks for the time!
     
  21. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Yep. You should listen for fail load ad event.
    And load admob banner in this case. You can do the same with spiriting or with PlayMaker. Let me know if you need the code example.

    Cheers!
     
  22. theHoboBob

    theHoboBob

    Joined:
    Apr 10, 2014
    Posts:
    3
    Thanks for the reply! It would be awesome if I had an example to work off of. I again appreciate the time! These plugins are fantastic!

    Thanks again!
     
  23. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Okay, so assuming we have IOS Native and Google Mobile Ad plugins:
    Code (CSharp):
    1. //creating iAd banner
    2. iAdBannerMyiAdBanner = iAdBannerController.instance.CreateAdBanner(TextAnchor.UpperLeft);
    3.  
    4. //listening for the fail event
    5. MyiAdBanner.addEventListener(iAdEvent.FAIL_TO_RECEIVE_AD, OnFail);
    6.  
    7.  
    8. //OnFail method
    9. private void OnFail() {
    10. //Creating AdMob banner because iAd is failed to load
    11. GoogleMobileAdBanner MyAdmobBanner = GoogleMobileAd.CreateAdBanner(TextAnchor.UpperLeft, GADBannerSize.BANNER);
    12. }
     
  24. theHoboBob

    theHoboBob

    Joined:
    Apr 10, 2014
    Posts:
    3
    Thanks a lot! Really appreciate it.
     
  25. PeterShoferistov

    PeterShoferistov

    Joined:
    Sep 22, 2013
    Posts:
    59
    Awesome! Any news?
     
  26. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Well, there is an issue with XAP that we trying to solve currently. I just need to achieve auto xml import in compiling project with is not very easy to do on WP8, working on it to release ASAP.

    Cheers!
     
  27. Scaleus

    Scaleus

    Joined:
    Jun 26, 2014
    Posts:
    8
    Hi,

    I'm having a problem when I try to compile for iOS.

    I've 3 of your plugins installed and I've read the guides:

    - Android Native.
    - iOS Native -> I included the 3 frameworks (I not setting Apple ID because I've not it yet, can be that the problem?)
    - Google Mobile Ads SDK -> I included the frameworks, I added the '-ObjC' flag and I've move Android and IOS folders to Assets/Plugins.

    Here is the error I'm getting:

    ld: warning: directory not found for option '-L"/Users/pc/Desktop/game_name/Libraries"'

    ld: library not found for -liPhone-lib

    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    Any ideas?


    Edit:

    I've the newest version of plugins, but Iget a lot of "deprecated" function warnings.
     
    Last edited: Jul 11, 2014
  28. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello.
    Can you give me more detailed report on this?

    Can you please import all plugins in one clean project and try to build it? I need to know if it's something connected with your project and probably old plugin files, or if it's compatibility issue.

    Cheers!
     
  29. Scaleus

    Scaleus

    Joined:
    Jun 26, 2014
    Posts:
    8
    There are some of them:



    I'm going to build a new project.
     
  30. Scaleus

    Scaleus

    Joined:
    Jun 26, 2014
    Posts:
    8
    1, I made a new project.
    2. I put a cube in the scene, I added the plugins and I built it.
    3. I opened the Xcode project, added the IOS folder and the required frameworks (although there is no difference if I don't do it).
    4. Clicked play and…

    ld: warning: directory not found for option '-L"/Users/pc/Desktop/IOSPrueba/Libraries"'

    ld: library not found for -liPhone-lib

    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    And a project without the plugins compiles :(
     
  31. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Thanks for report. On it.


    1) Make sure you project path contains only english letters.
    2) Clean up Xcode project - shift-command-K
     
    Scaleus likes this.
  32. Stans-Assets

    Stans-Assets

    Joined:
    Jun 20, 2014
    Posts:
    57
    Google Mobile Ads v 3.0 just released.



    New Features:

    Editor Settings UI

    New PlayMaker Actions:
    • GAD_BannerEvents
    • GAD_InterstitialEvents
     
  33. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    Do you have to do anything other than drop the MyBanner prefab into your project and setup your IDs? I cannot test on Android but my users tell me no ads display. Or do they not display often (ie, they arent playing long enough to see an ad)?

    Thanks!
     
  34. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    If you do not what to use reach API, and what only display banners then prefabs solution os way to go, yes. if you do not see any ads, it mean something wrong with set up.

    1) Have you completed this step? (it will be automatic in next version)
    https://docs.google.com/document/d/...xL2_jpT0Ysq6RxJAM/edit#heading=h.xm6hg7ypoyge

    2) If you steel have problem please send log cat log, or if you can not test it on adnrodi device as you sad, simply send apk, to stans.assets@gmail.com

    Cheers!
     
  35. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    Oh, I didn't catch that part of the documentation. Ok, I'll copy and update and try that. Thanks!
     
  36. KenOnion

    KenOnion

    Joined:
    May 1, 2013
    Posts:
    2
    Hello,
    I got a exception when I try to running on iOS.




    Any ideas? Thanks!


    **SOLVED**
    delete and rebuild Xcode project
     
    Last edited: Jul 29, 2014
  37. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Hi first off I like your asset works well. With your latest release went ahead and tried your update that included windows phone. I did get it to work after I realized I needed to add the web component permission to the manifest. Once I got it working worked well but I did notice 2 issues.

    1. Interstitial ads were displayed in portrait even if the app is in landscape mode (unlike the other platforms where it seems to know what orientation the device is using.
    2. I was using it as a test but a real ad was used instead. I looked at your code and the registering of a test device looks to be commented out on windows phone. Is this currently not working?
     
  38. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Thanks for report, on it!

    It's just works in a bit another way, so it not yet implemented, But will be in the next updated

    Cheers!
     
  39. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Just out of curiosity what android versions are supported for interstitials? Most of my android test devices the ads work just fine but I do have one really old Samsung Galaxy S (the first one) with android 2.3.6 on it and it does not work (logcat was unhelpful just failed to load ad error code 2) nothing else out of the ordinary same build works on other devices. Before I start changing things I'd figured I'd ask (is it because of the newer google-play-services.jar included with the package?).
     
  40. ababab5

    ababab5

    Joined:
    Apr 15, 2014
    Posts:
    508
    Hi,

    With the last version of the plugging, the file GoogleMobileAdBanner.mm is missing in Xcode (and some other files).

    What can I do (I add them manually ..).

    Thanks.

    Best regards,

    AB
     
  41. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Well it should work. Official restrictions looks like this:

    • Make sure you have the latest copy of the Android SDK and that you're compiling against at least Android v3.2 (set target in project.properties toandroid-13).

    • The Google Mobile Ads SDK for Android requires a run-time of Android 2.3 or later (set android:minSdkVersion to at least 9 in yourAndroidManifest.xml). This means you can develop with the latest version of the Android SDK and your app will still run on an earlier Android version (2.3minimum).
    With means if you have target version >13, you will bale to run it on device with android 2.3+
    And the error code 2 means:
    https://developer.android.com/refer.../ads/AdRequest.html#ERROR_CODE_INTERNAL_ERROR


    You just need to set up the plugin. It will be automatically in next release.
    https://docs.google.com/document/d/...xL2_jpT0Ysq6RxJAM/edit#heading=h.xm6hg7ypoyge
    Cheers!
     
  42. Stans-Assets

    Stans-Assets

    Joined:
    Jun 20, 2014
    Posts:
    57
    Google Mobile Ads v 3.1 just released.



    New Features:
    WP8 Support Added!


    New PlayMaker Actions:
    • GAD_InitGoogleAdWithCustomIds
     
  43. Arcanebits

    Arcanebits

    Joined:
    Dec 18, 2013
    Posts:
    108
    EDIT: I tested on a NEW proyect, with the Plugin from scratch... the same error... Im wondering if I have to put the AdMobCode myself on the pluginCode, I wont matter to do so, but need som info on this issue.

    I bought it and installed it, when I createEmpty+Add the code it just give me:
    1- SCRIPT ----> AdMobBannerInterstitial
    Nothing else, No place to put the code

    Is this new?
    I see the Videos, and in there its pops where to put the addcodes Error001.jpg
     
    Last edited: Aug 9, 2014
    ibro-bih likes this.
  44. BlackLotos

    BlackLotos

    Joined:
    Aug 9, 2014
    Posts:
    10
    Hi. there is no field to put banner Id. but in code I found this :
    public string sceneBannerId {
    get {
    return Application.loadedLevelName + "_" + this.gameObject.name;
    }
    }
    Now banner Id set in gameObject name ?
     

    Attached Files:

    ibro-bih likes this.
  45. BlackLotos

    BlackLotos

    Joined:
    Aug 9, 2014
    Posts:
    10
    set banner Id in gameObject name, but it's not working. So what I must to do, to make banners work?
     
    ibro-bih likes this.
  46. ibro-bih

    ibro-bih

    Joined:
    Aug 10, 2014
    Posts:
    5
    Pls help, Ad Mob Banner script no have Banner ID ? Pls update or code post in forum , How I simple add ads.
     

    Attached Files:

    BlackLotos likes this.
  47. sowatnow

    sowatnow

    Joined:
    Jun 12, 2014
    Posts:
    309
    Hi
    I can't get this to work.
    I simply loaded the Example scene, and created apk file. No ads showing on android device.
    Do i have to modify something before they show up?
     
    ibro-bih and BlackLotos like this.
  48. BlackLotos

    BlackLotos

    Joined:
    Aug 9, 2014
    Posts:
    10
    Maybe someone know , where is i can get 3.0 version?
     
  49. ibro-bih

    ibro-bih

    Joined:
    Aug 10, 2014
    Posts:
    5
    window -> google mobile ads -> settings But I still do not show ads
     
  50. ibro-bih

    ibro-bih

    Joined:
    Aug 10, 2014
    Posts:
    5
    window -> google mobile ads -> settings But I still do not show ads