You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But the logging seems to indicate that the application is expecting to find a com.google.ads.mediation.sample.SampleMediationAdapter class instead of the com.google.ads.mediation.sample.adapter.SampleAdapter present in the sample:
@eaullas this is a bug in the sample. You've noticed that com.google.ads.mediation.sample.adapter.SampleAdapter is the adapter class and com.google.ads.mediation.sample.SampleMediationAdapter is the class that's expecting initialize. Due to the architecture evolving over time, naming of adapters being locked forever due to the reflective nature of them being called, but us modifying our adapter naming best practices over time, these class names can be different in some cases.
What we've done to get this working in production adapters (example) is to have the adapter class extend from the class that expects the init call.
Thanks @ericleich,
What I did on my side was rename the SampleAdapter to SampleMediationAdapter (+package move) to have its method initialize properly called.
Having done that, my real concern is where does the Adapter class name to be initialized come from ? From AdMob backend customEvent mediation source declaration ? Because I have my own Adapter class in my sample, which gets instantiated properly following the ad call to AdMob, but never got initialized in the first place (despite the MobileAds.initialize() call at application startup)
I was expecting the see the initialize() method of the SampleAdapter get called at application startup after adding the proper initialization code :
But the logging seems to indicate that the application is expecting to find a
com.google.ads.mediation.sample.SampleMediationAdapter
class instead of thecom.google.ads.mediation.sample.adapter.SampleAdapter
present in the sample:D/MyApp: Adapter name: com.google.android.gms.ads.MobileAds, Description: READY, Latency: 44 D/MyApp: Adapter name: com.google.ads.mediation.mopub.MoPubMediationAdapter, Description: NOT_READY, Latency: 2 D/MyApp: Adapter name: com.google.ads.mediation.facebook.FacebookMediationAdapter, Description: NOT_READY, Latency: 4 D/MyApp: Adapter name: com.google.ads.mediation.applovin.AppLovinMediationAdapter, Description: NOT_READY, Latency: 2 D/MyApp: Adapter name: com.google.ads.mediation.sample.SampleMediationAdapter, Description: NOT_READY, Latency: 4 D/MyApp: Adapter name: com.google.ads.mediation.adcolony.AdColonyMediationAdapter, Description: NOT_READY, Latency: 12 D/MyApp: Adapter name: com.google.ads.mediation.inmobi.InMobiMediationAdapter, Description: NOT_READY, Latency: 3
The text was updated successfully, but these errors were encountered: