I tried to implement MediationTestSuite into my Unity Game, but I got this exception and therefore couldn't see MediationTestSuite
Exception:
java.lang.IllegalStateException: setAdListener must be called on the main UI thread.
at lr.b(:com.google.android.gms.policy_ads_fdr_dynamite@21001000@21001000.272763194.272763194:1)
at com.google.android.gms.ads.nonagon.shim.f.a(:com.google.android.gms.policy_ads_fdr_dynamite@21001000@21001000.272763194.272763194:14)
at com.google.android.gms.ads.nonagon.shim.g.a(:com.google.android.gms.policy_ads_fdr_dynamite@21001000@21001000.272763194.272763194:4)
at com.google.android.gms.ads.internal.client.ap.a(:com.google.android.gms.policy_ads_fdr_dynamite@21001000@21001000.272763194.272763194:62)
at ff.onTransact(:com.google.android.gms.policy_ads_fdr_dynamite@21001000@21001000.272763194.272763194:4)
at android.os.Binder.transact(Binder.java:667)
My code is
public void OnButtonClick()
{
GoogleMobileAdsMediationTestSuite.Api.MediationTestSuite.Show();
}
Binded on single button in scene.
I've tried to do this directly in Update method by dispatching this call, also tried to create empty Unity project and by adding into it only GoogleMobileAds-v4.1.0 + GoogleMobileAdsUnityAdsMediation + GoogleMobileAdsMediationTestSuite all downloaded directly from Google links.
Is there something I'm missing here, or is it just MediationTestSuite that is bugged and calles some UI stuff in separate thread?
It's definetely not a duplicate of AdMob Interstitial and error isLoaded must be called on the main UI thread since it's in Unity and I do not have access to MeditationTestSuite library code.