Search Unity

Mobile Ads - Simple way to integrate ads in your app

Discussion in 'Assets and Asset Store' started by GleyGames, May 1, 2018.

?

What other advertisers we should add to our plugin?

Poll closed Oct 21, 2019.
  1. Facebook Ads

    64.7%
  2. AppLovin

    34.1%
  3. Tapjoy

    10.6%
  4. MoPub

    15.3%
  5. LeadBolt

    7.1%
  6. ironSource

    20.0%
  7. inMobi

    8.2%
  8. Mobusi

    0 vote(s)
    0.0%
  9. Appnext

    2.4%
  10. Appodeal

    8.2%
Multiple votes are allowed.
  1. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    From our documentation page 22:
    //show an interstitial from a specific advertiser
    Advertisements.Instance.ShowInterstitial(GleyMobileAds.SupportedAdvertisers.AdvertiserName, InterstitialClosed);
     
    Aitssam likes this.
  2. Aitssam

    Aitssam

    Joined:
    Sep 3, 2020
    Posts:
    5
    @GleyGames Thanks for your reply Sir.

    I have another question: I am integrating the Facebook Audience network I followed your instructions that you have mentioned in answer to the question in this forum. That we should remove the com.facebook.6.1... and replace with 5.10 i did it. but on debug mode there is message shown that Rewarded Video Failed to Load: An Unknown error has occurred. Kindly tell the solution.
     
  3. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    That means that your ID is not properly configured to receive rewarded ads, your app was not yet approved by Facebook to receive rewarded ads, or there is a problem of communication between your app and Facebook app.
    You can read more about the Facebook rewarded videos here:
    https://www.facebook.com/business/help/1436503863061863?id=211412110064838&helpref=faq_content

    And here you can find a complete project with Facebook ads that works:
    https://github.com/gleygames/MobileAds-Facebook
     
    Aitssam likes this.
  4. Aitssam

    Aitssam

    Joined:
    Sep 3, 2020
    Posts:
    5
    Thank You So much Sir!
     
  5. r137

    r137

    Joined:
    Mar 12, 2018
    Posts:
    47
  6. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    You are right. I will submit an update to the plugin today. Thank you for reporting.
     
    r137 likes this.
  7. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    r137 likes this.
  8. r137

    r137

    Joined:
    Mar 12, 2018
    Posts:
    47
    Thanks for the patch. MixedAudience flag really confused me. I think Facebook documentation is not very clear about that. I thought we should set it true if game is directed for everyone because of this paragraph in the following link:

    https://developers.facebook.com/docs/audience-network/guides/coppa/

    But now I checked the other SDKs and I think it is clear that we should set it to false if app is not directed to children.

    https://github.com/googleads/google...n/facebook/FacebookMediationAdapter.java#L292
     
  9. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    If your app is not specially made for kids, that flag should be false. In my opinion that flag should always be false :)
     
    r137 likes this.
  10. quangminh_iam

    quangminh_iam

    Joined:
    Jan 19, 2015
    Posts:
    6
    i get some bug when use lastest mobile ads(1.9.14):
    - GoogleMobileAds-v5.3.0 + Firebase 6.16.1
    upload_2020-11-11_14-24-49.png
     

    Attached Files:

  11. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    Please make sure you correctly installed Google Mobile Ads 5.3.0.
    I just tested it and everything works, please check this repository with a complete project with Admob already integrated:
    https://github.com/gleygames/MobileAds-2020-Admob
     
    quangminh_iam likes this.
  12. quangminh_iam

    quangminh_iam

    Joined:
    Jan 19, 2015
    Posts:
    6
    I remove folder gleymobile and reimport again, it's ok, thanks for reply

    Can you update mobile ads into mobile tools+complete game?
    I just bought this plugin
     
    Last edited: Nov 12, 2020
  13. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    Mobile Tools is 60$ by default. But is you own Mobile Ads, you can get it wilt 39$ so you receive 21$ discount if you buy it. It is your decision and all this is handled by Asset Store so if you decide to buy it just add it to your cart, I cannot provide any additional discounts.
    Also Mobile Tools will be updated today.
     
    quangminh_iam likes this.
  14. jibicatstudio

    jibicatstudio

    Joined:
    Nov 19, 2020
    Posts:
    1
    Hello
    Tody i did test my game on iOS device and i found some problem.

    "InterstitialClosed" and "CompleteMethod" method not work after displaying interstitial ad or rewarded ad. this problem found only time i use appLovin ad network.

    I try to test again by admob and unity ads and found it work fine.

    I use unity 2018.4.29 + plugin mobile ads 1.9.14 + appLovin 6.3.0. test device iPad7 iPadOS 14.2

    Plese help me.
     
  15. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Thank you for the info, I will check it using your unity version and let you know if there is a bug.
     
  16. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    image_2020-11-20_114500.png
    I can confirm that the callbacks are triggered correctly from AppLovin using Unity 2018.4.29 and iOS 4.2.
    If you need the complete project I used please send me an email at gley.assets@gmail.com with your invoice number and I will provide you the project.
    Thank you!
     
  17. Aitssam

    Aitssam

    Joined:
    Sep 3, 2020
    Posts:
    5
    @GleyGames Hi Sir! i m facing an issue with IronSurce ads i have implemented the Applovin and iron source sdks into project approving ads are working fine but iron source ads are not displaying i checked the console there is an error displayed (Interstitial Failed to Load ads 508: the server response does not contain interstitial data). Kindly let me know what can be the issue even Aplovin ads are working.
     
    Last edited: Nov 29, 2020
  18. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    It looks like you ironSource ads are not getting any fills, please make sure they are correctly configured inside dashboard..
    Please check this full project with all advertisers already integrated and working and compare it with yours.
    https://github.com/gleygames/MobileAds-Unity2019LTS-AllAds
     
  19. qualityEasyShop

    qualityEasyShop

    Joined:
    Nov 12, 2020
    Posts:
    1
    hello

    wondering if there is a possibility to load ads code from external link with a json file and store them in strings for gley
    so we can change ads code on fly without doing update every time
     
  20. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    If you want to change your mediation settings, that is possible without updating the app, but if you want to entirely change your IDs at runtime, that is not possible. Please check the documentation.
     
  21. Mastimed

    Mastimed

    Joined:
    Nov 29, 2016
    Posts:
    5
    Hello ...when i tried to add admob and audience network I get this error.

    \Temp\gradleOut\launcher\build\intermediates\merged_manifests\release\AndroidManifest.xml:38: AAPT: error: unexpected element <queries> found in <manifest>.
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
    Last edited: Jan 14, 2021
  22. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Please remove the queries from you manifets. Those are not related to ad plugins.

    Also here is a complete project with all advertisers already integrated:
    https://github.com/gleygames/MobileAds-Unity2019LTS-AllAds
     
    Starbox likes this.
  23. Mastimed

    Mastimed

    Joined:
    Nov 29, 2016
    Posts:
    5
    as you can see i do not have any other plugin in my project

    upload_2021-1-14_11-53-18.png
     
  24. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Please verify the full project from the link.
     
  25. jlrueda

    jlrueda

    Joined:
    Aug 14, 2017
    Posts:
    3
    Hi Glay
    Thanks for the amazing asset!

    Having problems with Unity Audience Network SDK 6.4.0 on Unity 2019.4.16f1.

    Unity complains: Manifest merger failed with multiple errors.

    And Gradle 6.0 complains:

    Missing 'package' key attribute on element package at [com.facebook.android:audience-network-sdk:6.4.0] AndroidManifest.xml:12:9-55

    Have been looking in the support videos but could not find a solution. I'm using Mobile Ads v1.9.17. First installed Unity Ads with no issue but after installed FAN the Android build failed. I'm using the latest External Dependency Manager 1.2.165 any thoughts?

    Thanks in advance.
     
    Last edited: Jun 11, 2021
  26. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    If you are using Unity 2019 you need to upgrade your gradle version. Please check this video on how to do that:
     
  27. jlrueda

    jlrueda

    Joined:
    Aug 14, 2017
    Posts:
    3
    Thank you for the super quick response. It worked perfectly. Awesome support.

    All the best
     
    GleyGames likes this.
  28. kimwuchoong

    kimwuchoong

    Joined:
    Sep 21, 2016
    Posts:
    8
    Hi, Your plugin tested with Google Mobile Ads Unity Plugin v6.0.2?

    I run well with simulator or device ios 14 but not show admob on simulator/device on ios smaller 14.
    Can you check it?
     
  29. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    kimwuchoong likes this.
  30. kimwuchoong

    kimwuchoong

    Joined:
    Sep 21, 2016
    Posts:
    8

    Attached Files:

  31. kimwuchoong

    kimwuchoong

    Joined:
    Sep 21, 2016
    Posts:
    8
    I use Unity 2020.2.0f1,
    Xcode 12.5.1
    OS: Big Sur
    Unity Admob 6.0.0
     
  32. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    From your error it looks like your error is not from my implementation. Please download the sample project from Admob located here:
    https://github.com/googleads/googleads-mobile-unity/releases

    And if you download the source code you will find the HelloWorld example. Please build that example and see if your error persists. If it does please contact the Admob support because it is their code, I am not allowed to modify it.

    Another suggestion it might be to switch to the LTS version of Unity because it has a lot of fixes and some of those might fix your crash too.

    I also recommend to test on a real device because it might behave differently. It is known that ads to not work properly on emulators.
     
  33. kimwuchoong

    kimwuchoong

    Joined:
    Sep 21, 2016
    Posts:
    8
    Hi,
    I run your sample project and have error same above (with simulator ios < 14),
    (https://github.com/gleygames/MobileAds-Unity2019LTS-AllAds)

    You can check it.

    Thanks
     

    Attached Files:

  34. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    Then it looks like the Admob SDK no longer works with iOS<14. Please contact the Admob support and let them know about this issue. I cannot help you here because I did not developed the Admob SDK I only use it like yourself.
     
  35. kimwuchoong

    kimwuchoong

    Joined:
    Sep 21, 2016
    Posts:
    8
    Thanks for quick support!
     
  36. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Due to this reason, even if I have nothing to do with that, you can send me your invoice number and I will offer you a refund. But I am almost sure that no other Admob implementation will fix your issue.
     
  37. kimwuchoong

    kimwuchoong

    Joined:
    Sep 21, 2016
    Posts:
    8
    Thank you. No need refund. I'm trying with other OS and Xcode to find problem.

    I bought Promo Cross, Rate and Daily Reward plugin before, they work well.
     
    GleyGames likes this.
  38. vakulan0

    vakulan0

    Joined:
    Apr 1, 2021
    Posts:
    2
    Hi Sorry if this has been answered. When i click the Show banner in Test scene that you provided, i get this error:


    Code (CSharp):
    1. You are trying to create a MonoBehaviour using the 'new' keyword.  This is not allowed.  MonoBehaviours can only be added using AddComponent(). Alternatively, your script can inherit from ScriptableObject or no base class at all
    2. 0x00007ff6eb0cbfec (Unity) StackWalker::GetCurrentCallstack
    3. 0x00007ff6eb0d43c9 (Unity) StackWalker::ShowCallstack
    4. 0x00007ff6ec5b99bc (Unity) GetStacktrace
    5. 0x00007ff6ed6bd9d3 (Unity) DebugStringToFile
    6. 0x00007ff6eaeffc7e (Unity) MonoBehaviour::ConstructorCheck
    7. 0x00007ff6eb240b72 (Unity) MonoBehaviour_CUSTOM_ConstructorCheck
    8. 0x00000199223dc5d7 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.MonoBehaviour:ConstructorCheck (UnityEngine.Object)
    9. 0x00000199223dc53b (Mono JIT Code) UnityEngine.MonoBehaviour:.ctor ()
    10. 0x00000199224960bb (Mono JIT Code) ButtonBehaviour:.ctor ()
    11. 0x0000019922496023 (Mono JIT Code) GoogleMobileAds.Unity.BannerClient:CreateButtonBehavior ()
    12. 0x000001992245b393 (Mono JIT Code) GoogleMobileAds.Unity.BannerClient:ShowBannerView ()
    13. 0x000001992245b13b (Mono JIT Code) GoogleMobileAds.Unity.BannerClient:LoadAd (GoogleMobileAds.Api.AdRequest)
    14. 0x000001992245b0de (Mono JIT Code) GoogleMobileAds.Api.BannerView:LoadAd (GoogleMobileAds.Api.AdRequest)
    15. 0x0000019922457a2b (Mono JIT Code) [CustomAdmob.cs:463] GleyMobileAds.CustomAdmob:LoadBanner (BannerPosition,BannerType)
    16. 0x000001992245733b (Mono JIT Code) [CustomAdmob.cs:334] GleyMobileAds.CustomAdmob:ShowBanner (BannerPosition,BannerType,UnityEngine.Events.UnityAction`3<bool, BannerPosition, BannerType>)
    17. 0x0000019922456d6a (Mono JIT Code) [Advertisements.cs:698] Advertisements:LoadBanner (BannerPosition,BannerType,bool,GleyMobileAds.SupportedAdvertisers)
    18. 0x00000199224567db (Mono JIT Code) [Advertisements.cs:625] Advertisements:ShowBanner (BannerPosition,BannerType)
    19. 0x0000019921d3b16b (Mono JIT Code) [TestAds.cs:94] TestAds:OnGUI ()
    20. 0x00000199223dbf60 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    21. 0x00007fff658fe630 (mono-2.0-bdwgc) [mini-runtime.c:2812] mono_jit_runtime_invoke
    22. 0x00007fff65882ac2 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke
    23. 0x00007fff6588bb1f (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke
    24. 0x00007ff6eaf54444 (Unity) scripting_method_invoke
    25. 0x00007ff6eaf4cd95 (Unity) ScriptingInvocation::Invoke
    26. 0x00007ff6e9ababa8 (Unity) MonoBehaviourDoGUI
    27. 0x00007ff6e9abd060 (Unity) IMGUIModule::MonoBehaviourDoGUI
    28. 0x00007ff6eaf004fc (Unity) MonoBehaviour::DoGUI
    29. 0x00007ff6e9ab457a (Unity) GUIManager::DoGUIEvent
    30. 0x00007ff6e9abbd86 (Unity) GUIManager::SendQueuedEvents
    31. 0x00007ff6e9ab7111 (Unity) `GUIManager::InitGUIManager'::`2'::PreUpdateIMGUISendQueuedEventsRegistrator::Forward
    32. 0x00007ff6ea81f64c (Unity) ExecutePlayerLoop
    33. 0x00007ff6ea81f723 (Unity) ExecutePlayerLoop
    34. 0x00007ff6ea8265d9 (Unity) PlayerLoop
    35. 0x00007ff6ebc54ad1 (Unity) PlayerLoopController::UpdateScene
    36. 0x00007ff6ebc52766 (Unity) Application::TickTimer
    37. 0x00007ff6ec5c31b1 (Unity) MainMessageLoop
    38. 0x00007ff6ec5c71f1 (Unity) WinMain
    39. 0x00007ff6ee418e86 (Unity) __scrt_common_main_seh
    40. 0x00007fffb7bf7c24 (KERNEL32) BaseThreadInitThunk
    41. 0x00007fffb894d721 (ntdll) RtlUserThreadStart
    42.  
    Please help
     
  39. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    I am sure this is a warning not an error and it comes from the Admob plugin not from my plugin. So if you are concern about that warning please contact the Admob support team.

    If your banner does not appear on your device please make sure your app si signed with your release key, uploaded to the store on a test track and downloaded with a test user and your ads should work,
    Thank you!
     
  40. vakulan0

    vakulan0

    Joined:
    Apr 1, 2021
    Posts:
    2
    Thank you , it looks like the test ads are showing fine.
     
    GleyGames likes this.
  41. GameLoverPassion

    GameLoverPassion

    Joined:
    Jul 27, 2021
    Posts:
    9
    Hi, I use your SDK, after update the SDK, Facebook, and Google ads I get some errors.
    I solve them with these tutorials:





    It SEEMS to work, but I get this error when I push the bundle on the play store:

    An error occurred while running bundletool build-apks on your uploaded App Bundle. Ensure that your App Bundle is valid by running bundletool build-apks locally and try again.




    PLEASE tell me there is a way to solve this....
     
  42. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Sorry, Since yesterday Google changed the way app upload works. I did not created a new app yet so I am not able to guide you to that process, but am pretty sure that you can find more info inside Google Play documentation. I will look more into it myself and maybe create a tutorial about this, but I need to properly inform first.
    I am pretty sure that the solution is independent from the content of the .apk. If you think that is has something to do with my plugin let me know and I will investigate in details.
    thank you!
     
  43. GameLoverPassion

    GameLoverPassion

    Joined:
    Jul 27, 2021
    Posts:
    9
    Hi, i still investigated on that
    but I have a problem ALSO ON IOS
    I get this error:

    Code (CSharp):
    1.  
    2. Analyzing dependencies
    3. [!] CocoaPods could not find compatible versions for pod "FBSDKCoreKit/Basics":
    4.   In Podfile:
    5.     FBAudienceNetwork (~> 6.4.1) was resolved to 6.4.1, which depends on
    6.       FBSDKCoreKit/Basics (>= 7.0.1)
    7.  
    8. None of your spec sources contain a spec satisfying the dependency: `FBSDKCoreKit/Basics (>= 7.0.1)`.
    9.  
    10. You have either:
    11. * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
    12. * mistyped the name or version.
    13. * not added the source repo that hosts the Podspec to your Podfile.
    14.  
    15.  
    16.     [33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
    17.     Consider adding the following to ~/.profile:
    18.  
    19.     export LANG=en_US.UTF-8
    20.     [0m
    21. Ignoring ffi-1.13.1 because its extensions are not built. Try: gem pristine ffi --version 1.13.1
    I am stuck with this, because i cannot avoid update because otherwise your plugin give me error, but if I update Audience Network i get this error

    Any way to solve this?

    Because for now the only possible solution is not use your sdk...
     
    Last edited: Sep 4, 2021
  44. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,

    I can confirm that Audience network builds on iOS i just tested it. I am not able to send you the entire project here because this is a public place but if you write me at
    gley.mobi@gmail.com
    or to discord:
    https://discord.gg/7eSvKKW

    I can provide you the project I used.

    Also I hope you are aware of this:
    https://developers.facebook.com/docs/audience-network/bidding/partner-mediation
     
  45. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    I just Uploaded a new update to Google Play and everything runs smoothly as before, so your error is not related to the content of my plugins. This application includes all plugins from Mobile Tools and you can check it yourself it is live and all it is working:
    https://play.google.com/store/apps/details?id=com.gley.chickenjump
     
  46. GameLoverPassion

    GameLoverPassion

    Joined:
    Jul 27, 2021
    Posts:
    9


    First of all, thank you for taking the time to reply to me

    The game had already audience network and google and compiled fine in the past.

    I only:
    Updated your SDK
    Updated audience network
    Updated google ads

    And I get that error

    Since I will contact on discord as soon as I can to try to reimport the entire project on your base...
    But there is nothing you can suggest to me to solve the problem? :(
     
  47. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Delete the old versions and import the new ones. Ads SDKs usually are not working properly when updated.
     
  48. dayjur

    dayjur

    Joined:
    Sep 6, 2014
    Posts:
    128
    Hi,
    Currently I test wit test add id's, can yous implement a section for adding device id's for testing this way one can leave the real ad id's in
     
  49. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Thank you for the suggestion, I will consider it for a future update.
     
  50. lukezinsan

    lukezinsan

    Joined:
    Jan 16, 2014
    Posts:
    19
    Hello
    I've been using the gley plugin for a long time. and that is very helpful.

    I want to ask, does gley support add open from admob?

    if it can be done then it will be very helpful

    thanks..