Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Unity Ads not working with AdMob Mediation

Discussion in 'Unity Ads' started by gayoso, Jul 3, 2017.

  1. gayoso

    gayoso

    Joined:
    Mar 17, 2016
    Posts:
    1
    Hi! I have setup AdMob Mediation and I am successfully getting both interstitial and rewarded video ads from both UnityAds and AdMob in my app (both networks in testing mode, no revenue yet). However, it seems that the callbacks I register are not called when I get an ad from UnityAds, but they work fine when I get an ad from AdMob.
    Here is the logcat output for an ad from AdMob:

    07-02 14:09:38.701 27937 27937 I Unity :
    07-02 14:09:44.612 4691 30635 I ActivityManager: START u0 {cmp=com.Cockbear.Cuboid/com.google.android.gms.ads.AdActivity (has extras)} from uid 10208 on display 0
    07-02 14:09:44.779 27937 27937 I Unity : interstitial ad opening
    07-02 14:09:44.779 27937 27937 I Unity :
    07-02 14:09:44.779 27937 27937 I Unity : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
    07-02 14:09:44.779 27937 27937 I Unity :
    07-02 14:09:45.093 4691 4728 I ActivityManager: Displayed com.Cockbear.Cuboid/com.google.android.gms.ads.AdActivity: +438ms
    07-02 14:09:45.103 4691 2996 I ActivityManager: Process android.process.media (pid 27566) has died
    07-02 14:09:45.103 4691 2996 D ActivityManager: cleanUpApplicationRecord -- 27566
    07-02 14:09:49.438 4691 7518 W ActivityManager: Duplicate finish request for ActivityRecord{e8c4e53 u0 com.Cockbear.Cuboid/com.google.android.gms.ads.AdActivity t747 f}
    07-02 14:09:49.531 27937 27937 I Unity : Ad was closed
    07-02 14:09:49.531 27937 27937 I Unity :
    07-02 14:09:49.531 27937 27937 I Unity : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

    And here is the output for an ad from UnityAds:

    07-02 14:09:50.776 27937 27937 I Unity :
    07-02 14:10:20.240 27937 27937 I Unity : interstitial ad opening
    07-02 14:10:20.240 27937 27937 I Unity :
    07-02 14:10:20.240 27937 27937 I Unity : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
    07-02 14:10:20.240 27937 27937 I Unity :
    07-02 14:10:20.435 4691 6804 I ActivityManager: START u0 {flg=0x10010000 cmp=com.Cockbear.Cuboid/com.unity3d.ads.adunit.AdUnitActivity (has extras)} from uid 10208 on display 0
    07-02 14:10:20.503 4691 17281 I ActivityManager: Config changes=480 {1.0 722mcc310mnc [en_US,es_AR] ldltr sw411dp w411dp h659dp 420dpi nrml port finger -keyb/v/h -nav/h s.644}
    07-02 14:10:20.900 4691 4728 I ActivityManager: Displayed com.Cockbear.Cuboid/com.unity3d.ads.adunit.AdUnitActivity: +426ms
    07-02 14:10:21.402 4691 4728 I ActivityManager: Config changes=480 {1.0 722mcc310mnc [en_US,es_AR] ldltr sw411dp w683dp h387dp 420dpi nrml land finger -keyb/v/h -nav/h s.645}

    These are from an interstitial, but for rewarded video I also get a successfull call to the "onReward" method with the AdMob ads, but not with the UnityAds ones.

    I know this question seems more logical in the AdMob Mediation github repo, but I have already asked there and I wanted to know if anyone here as come across this problem before. Most of all, I'm hoping this happens only because of the difference in how UnityAds and AdMob work when in development mode and it won't happen once I release the app. I read somewhere that AdMob creates real ad requests but provides no revenue (which is why I get ads for real games with AdMob) while UnityAds seem to provide "dummy" or test ads.

    From the logcats I can also notice that when I get an ad from UnityAds there is an activity started called "com.unity3d.ads.adunit.AdUnitActivity", and with AdMob ads it's "com.google.android.gms.ads.AdActivity". But I don't know enough to tell wether this is normal behaviour or not.

    Thanks!
     
  2. thomas231

    thomas231

    Joined:
    Aug 18, 2016
    Posts:
    4
    We have the same problem and it forces us to disable all Unity ads until we find a solution.
     
  3. wuym67123

    wuym67123

    Joined:
    Jan 3, 2017
    Posts:
    11
    You can try the admob unity ads plugin ,witch integrates admob and unity ads.
    I have success display video ads both admob and unity ads.
     
  4. rahat090255

    rahat090255

    Joined:
    Aug 15, 2018
    Posts:
    9
    I tired this but not working. Facebook is working fine but not unity
     
  5. DiegoR

    DiegoR

    Joined:
    Oct 31, 2012
    Posts:
    27
    Still have the same problem.

    If I use UnityAds directly works perfect. But when AdMob uses UnityAds though the mediation, the callbacks are not called and the app doesn't know when the ad was closed.

    I followed the integration instructions from Google AdMob, imported the package GoogleMobileAdsUnityAdsMediation.unitypackage and so on.