OnAdRewarded and OnAdClosed callbacks are not firing for unity rewarded ads while using mediation.

1,315 views
Skip to first unread message

Dorian Gray

unread,
Sep 5, 2017, 5:45:45 AM9/5/17
to Google Mobile Ads SDK Developers
I'm using Unity 5.6.2f1. When using admob mediation, if the ad is serving from Unity, OnAdRewarded and OnAdClosed callbacks are not firing. The admob ads works fine. Here're what I did to produce the problem.

1- Modify the HelloWorld sample app to use my own rewarded ad mediation id. (https://github.com/googleads/googleads-mobile-unity/tree/master/samples/HelloWorld)
2- Install Google Mobile Ads Unity Plugin v3.6.3. (https://github.com/googleads/googleads-mobile-unity/releases)
3- Install Unity Ads SDK through Unity editor. From Window -> Services menu. Link to my Unity project which has the rewarded ad.
4- Install Unity Ads adapter v2.1.0.0 from (https://bintray.com/google/mobile-ads-adapters-android/com.google.ads.mediation.unity#files/com/google/ads/mediation/unity) as described here (https://groups.google.com/forum/#!topic/google-admob-ads-sdk/0klwA5IbkBA)
5- Run the app. Request for a rewarded video ad. And show it.

I can see the ad running and the OnAdLoaded and OnAdOpening events are called. When the video finishes I close the ad. But OnAdRewarded and OnAdClosed events are not fired.

I've attached the logcat.

logcat for unity admob mediation.txt

Dorian Gray

unread,
Sep 5, 2017, 5:45:48 AM9/5/17
to Google Mobile Ads SDK Developers
logcat for unity admob mediation.txt

Bharani Cherukuri (Mobile Ads SDK Team)

unread,
Sep 5, 2017, 3:16:59 PM9/5/17
to Google Mobile Ads SDK Developers
Hello Dorian, 

Thank you for contacting us. We would need some additional information to proceed further. Could you log each Rewarded Ad Event particularly the onAdRewarded and onAdClosed events? Also, can you make sure that the reward object is returned correctly? Additionally, would you be able to provide us with a sample project of your implementation so we can reproduce the issue? 

If you could provide these details, I will be able to investigate the issue further.

Regards,
Bharani Cherukuri
Mobile Ads SDK Team.

Bharani Cherukuri (Mobile Ads SDK Team)

unread,
Sep 11, 2017, 9:09:17 AM9/11/17
to Google Mobile Ads SDK Developers
Hello Dorian, 

If you continue to have an issue with this, do provide us the information requested above so we can take a look.

Thanks,
Bharani Cherukuri
Mobile Ads SDK Team.

On Tuesday, September 5, 2017 at 5:45:45 AM UTC-4, Dorian Gray wrote:

Roger Sodré

unread,
Sep 17, 2017, 10:48:22 PM9/17/17
to Google Mobile Ads SDK Developers
Same thing happens to me. AdMob videos fires OnAdRewarded and OnAdClosed, but Unity ads don't.

My setup:

Unity 5.6.3
Google Mobile Ads Plugin 3.7.0
Unity Ads 2.1.1 (from the asset store)
Unity Ads adaptor for Android 2.1.1
Building for Android 26 (Gradle)
macOS 10.12.7


I recently upgraded AdMob, SDKs and adapters, so I reverted to the following setup, and the problem still happens:

Unity 5.6.2
Google Mobile Ads Plugin 3.6.3
Unity Ads 2.1.0 (from the asset store)
Unity Ads adaptor for Android 2.1.0

Roger Sodré

unread,
Sep 17, 2017, 10:54:49 PM9/17/17
to Google Mobile Ads SDK Developers
@Dorian Gray, did you find a workaround?

Bharani Cherukuri (Mobile Ads SDK Team)

unread,
Sep 18, 2017, 10:08:41 AM9/18/17
to Google Mobile Ads SDK Developers
Hello Roger, 

Thank you for contacting us. I was not able to reproduce the issue on my end. Would you be able to provide us a sample project of your implementation? This will help us investigate the issue and assist you further. Additionally, can you log each Rewarded Ad Event, particularly the onAdRewarded and onAdClosed events, and provide us with the Device logs, so we can take a look?

Regards,
Bharani Cherukuri
Mobile Ads SDK Team

On Tuesday, September 5, 2017 at 5:45:45 AM UTC-4, Dorian Gray wrote:
Message has been deleted

Roger Sodré

unread,
Sep 19, 2017, 9:29:05 PM9/19/17
to Google Mobile Ads SDK Developers
I have a stripped down project with te problem isolated and logs.
Please give me your email...

Bharani Cherukuri (Mobile Ads SDK Team)

unread,
Sep 26, 2017, 5:20:04 PM9/26/17
to Google Mobile Ads SDK Developers
Hello Roger, 

Thank you for following up. I was able to load the APK version, however, I was not able to build the sample project as it was requesting additional credentials(Project access, Project ID). Could you provide us the screen recordings and code snippets of your implementation so I can take a look? We would need a reproducible case of the issue so I can assist you regarding this.

Regards,
Bharani Cherukuri
Mobile Ads SDK Team

On Tuesday, September 5, 2017 at 5:45:45 AM UTC-4, Dorian Gray wrote:

Roger Sodré

unread,
Sep 26, 2017, 8:51:15 PM9/26/17
to Google Mobile Ads SDK Developers
Hi Bharani,

If you run the APK and see the logs, you'll get more than I can ever show on a screen recording.
I also sent you the logs with the highlighted messages showing the lack of events, you can run and see.
Have you at least seen the events not firing on the APK?

I sent a full project with the problem isolated, sources, APK and commented logs.
Code snippets and reproducible case... that's what I sent you, all the sources are there, I don't know what else I can provide.
As for Project ID, etc, you can replace for some of your own test projects, same for placement ids.

Roger

Roger Sodré

unread,
Sep 27, 2017, 9:41:23 PM9/27/17
to Google Mobile Ads SDK Developers
Ok, so the AdMob team sent me a new updated project to test. It works perfectly.
If I import the test script and add to my game scene, it also works.
I started removing things and guess what was causing the problem..
Calling Advertisement.Initialize(appId) !!!
AdMob already initializes Unity Ads, calling it twice messes it up.

qq543...@gmail.com

unread,
Mar 16, 2018, 11:29:40 PM3/16/18
to Google Mobile Ads SDK Developers
admob and unity ads works well.
https://github.com/unity-plugins/Unity-Admob/blob/master/admob_unity_plugin.unitypackage

在 2017年9月18日星期一 UTC+8上午10:54:49,Roger Sodré写道:
Reply all
Reply to author
Forward
0 new messages