Any specific devices issue occurs on: Tested on different devices with different Android versions
Mediation ad networks used, and their versions:
[REQUIRED] Step 2: Describe the problem
Steps to reproduce:
Rewarded interstitial ad events do not occur on the main Unity thread, despite setting "MobileAds.RaiseAdEventsOnUnityMainThread" to true. Depending on what actions are taken in this event call-back, this may result in the application crashing.
[REQUIRED] Step 1: Describe your environment
[REQUIRED] Step 2: Describe the problem
Steps to reproduce:
Rewarded interstitial ad events do not occur on the main Unity thread, despite setting "MobileAds.RaiseAdEventsOnUnityMainThread" to true. Depending on what actions are taken in this event call-back, this may result in the application crashing.
This problem was already mentioned in the issue https://github.com/googleads/googleads-mobile-unity/issues/2676
Relevant Code:
As you can see here: https://github.com/googleads/googleads-mobile-unity/blob/v8.2.0/source/plugin/Assets/GoogleMobileAds/Api/RewardedInterstitialAd.cs
The events are still called via
_client.OnAdClicked += () => { if (OnAdClicked != null) { OnAdClicked(); } };
but should be called via
_client.OnAdClicked += () => { MobileAds.RaiseAction(() => { if (OnAdClicked != null) { OnAdClicked (); } }); };