Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Has any user got mediation with ads working?

Discussion in 'Unity Mediation' started by jpom001, Jan 12, 2023.

  1. jpom001

    jpom001

    Joined:
    Dec 3, 2020
    Posts:
    69
    I seem to be knocking my head against a wall trying to get com.unity.services.mediation working on a device. I've tried multiple different versions of the editor, each one seems to have a unique reason of why it doesn't work?
    What version of unity editor did you use and which package version did you use?
    And did your player preferences look like this?
    Also were you able to run ads in test mode on a device and were you able to monetize in production without issues?
    upload_2023-1-12_16-14-32.png

    I've seen issues from incorrect java shipped, to game id not recognized, random issues with the android resolver just throwing exceptions with no indication of what the issue is and build stalling. I just want to know what the happy path is.
     
  2. jcGrenier

    jcGrenier

    Unity Technologies

    Joined:
    Feb 23, 2021
    Posts:
    145
    My first recommendation would be to use LevelPlay mediation, as there won't be further development on Unity Mediation. Unity merged with ironSource last year, and moving forward we will be focusing on their mediation solution, LevelPlay. We are working on integrating the solution within the editor, and improving the product itself.

    As for the happy path, I would recommend consulting the documentation, or looking at the example scene bundled in LevelPlay to get started. I can't really give more specific pointers for the moment.

    Hope this helps :)
     
  3. jpom001

    jpom001

    Joined:
    Dec 3, 2020
    Posts:
    69
    I dont want to use that as its requested my bank details over an email, that seems very insecure and since I see other people having issues with it I dont want to use it until its ready.
    Since mediation is still available I would rather use that.

    If mediation hasnt been deprecated and still working I would like to use that.
     
  4. jcGrenier

    jcGrenier

    Unity Technologies

    Joined:
    Feb 23, 2021
    Posts:
    145
    We currently only support our current Unity Mediation users, so creating a new project on Unity's dashboard probably won't be possible, unfortunately.

    While the e-mail may seem sketchy, I can assure you it is legitimate, and if you are still worried know that you can do your implementations and tests before you provide your banking informations. Also feel free to contact ironSource if you have questions or concerns.
     
    jpom001 likes this.
  5. jpom001

    jpom001

    Joined:
    Dec 3, 2020
    Posts:
    69
    I didn't realize that, Ill use levelplay so but Id like to have more specific instructions on how to get it working. I tried to follow the instructions in the link above on version 2022.2.0 but the android resolver does not import after installing the iron source. The instructions say any version above 2017.2 but what versions have you tested on that work, I can use what ever version of unity I need for this project but Id like to get up and running faster.

    Can you please tell me which version of unity should I use ?

    Edit: same issue on 2022.2.2 , I get this when I open project, I click import.
    upload_2023-1-12_22-12-40.png

    After import I do not have the resolver. I tried restarting , creating new project in different versions with no luck
    upload_2023-1-12_22-13-55.png
     

    Attached Files:

    Last edited: Jan 12, 2023
  6. jpom001

    jpom001

    Joined:
    Dec 3, 2020
    Posts:
    69
    There seems to be issues with that documentation. I think you want me to install the a package called "Ads Mediation" but it dosent say that there. I think thats where the resolver should come from.

    Also in step two it tells me to
    1. Code (CSharp):
      1. Select “Patch mainTemplate.gradle
      But I dont see that option in the menu, is this document right?
      The image in the page is blurry even on zoom in.
    If its not, are you sure its not possible for me to use the old way, am I locked out by a button flip on the unity side that can be resolved. Maybe I'm just missing some steps in the document but it seems to not be reflective of the process ?

    Do you know of any other users that have got this working I can copy there set up if need be. I just dont want to keep banging my head against this if its not working.
     
  7. jcGrenier

    jcGrenier

    Unity Technologies

    Joined:
    Feb 23, 2021
    Posts:
    145
  8. jpom001

    jpom001

    Joined:
    Dec 3, 2020
    Posts:
    69
    I didnt see any thing in the logs either.
    So I downloaded that Ads Mediation from the package manager.

    When I go to resolve something I get this error in the logs.

    Code (CSharp):
    1. Win32Exception: ApplicationName='C:\unityProjects\test1\Temp\PlayServicesResolverGradle\gradlew.bat', CommandLine='--no-daemon -b "C:\unityProjects\test1\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=C:/Program Files/Unity/Hub/Editor/2022.2.2f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK" "-PTARGET_DIR=C:\unityProjects\test1\Assets\Plugins\Android" "-PMAVEN_REPOS=https://android-sdk.is.com/;https://maven.google.com/" "-PPACKAGES_TO_COPY=com.ironsource.sdk:mediationsdk:7.2.6;com.google.android.gms:play-services-ads-identifier:18.0.1;com.google.android.gms:play-services-basement:18.1.0" "-PUSE_JETIFIER=0" "-PDATA_BINDING_VERSION=7.1.2"', CurrentDirectory='C:\unityProjects\test1\Temp\PlayServicesResolverGradle', Native error= The system cannot find the file specified.
    2.  
    This gradle seems to be in the temp folder, do you know which file is missing from here
    This is the full exception
    Code (CSharp):
    1.  
    2.  
    3. Running Gradle...
    4.  
    5. C:\unityProjects\test1\Temp\PlayServicesResolverGradle\gradlew.bat --no-daemon -b "C:\unityProjects\test1\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=C:/Program Files/Unity/Hub/Editor/2022.2.2f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK" "-PTARGET_DIR=C:\unityProjects\test1\Assets\Plugins\Android" "-PMAVEN_REPOS=https://android-sdk.is.com/;https://maven.google.com/" "-PPACKAGES_TO_COPY=com.ironsource.sdk:mediationsdk:7.2.6;com.google.android.gms:play-services-ads-identifier:18.0.1;com.google.android.gms:play-services-basement:18.1.0" "-PUSE_JETIFIER=0" "-PDATA_BINDING_VERSION=7.1.2"
    6. Executing command: C:\unityProjects\test1\Temp\PlayServicesResolverGradle\gradlew.bat --no-daemon -b "C:\unityProjects\test1\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=C:/Program Files/Unity/Hub/Editor/2022.2.2f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK" "-PTARGET_DIR=C:\unityProjects\test1\Assets\Plugins\Android" "-PMAVEN_REPOS=https://android-sdk.is.com/;https://maven.google.com/" "-PPACKAGES_TO_COPY=com.ironsource.sdk:mediationsdk:7.2.6;com.google.android.gms:play-services-ads-identifier:18.0.1;com.google.android.gms:play-services-basement:18.1.0" "-PUSE_JETIFIER=0" "-PDATA_BINDING_VERSION=7.1.2"
    7.  
    8.  
     
  9. jpom001

    jpom001

    Joined:
    Dec 3, 2020
    Posts:
    69
    So the above issue I fixed by adding my custom gradle files in the preferences.
    I'm not sure which one I needed as it wasnt in the docs but I have all of them added now.
    Ill continue these questions on levelplay forum as I think this is off topic for here, thanks!
     
  10. Davidbillmanoy

    Davidbillmanoy

    Joined:
    Jul 7, 2014
    Posts:
    120
    I got everything working, except the BannerAds.java caused my Android build to fail.
     
  11. messegiovanni

    messegiovanni

    Joined:
    Apr 4, 2020
    Posts:
    4
    @Davidbillmanoy did you find a solution? Having the same problem with the bannerads on build
     
  12. unity_-cw_hVtYUoriJA

    unity_-cw_hVtYUoriJA

    Joined:
    Sep 20, 2017
    Posts:
    1