Closed junjunsong closed 1 year ago
@junjunsong
=======================================
Looking at the waterfall code, it's basically the same as the bidding, except the below class(es) and method(s), but they are using the same listeners:
mbBannerView.load();
mbBannerView.loadFromBid(bidToken);
mbNewInterstitialHandler
mbBidNewInterstitialHandler
mbNewInterstitialHandler.load();
mbBidNewInterstitialHandler.loadFromBid(bidToken);
mbNewInterstitialHandler.show();
mbBidNewInterstitialHandler.showFromBid();
mbNativeHandler
mbBidNativeHandler
mbNativeHandler.load();
mbBidNativeHandler.bidLoad(bidToken);
mbRewardVideoHandler
mbBidRewardVideoHandler
mbRewardVideoHandler.load();
mbBidRewardVideoHandler.loadFromBid(bidToken);
mbRewardVideoHandler.show();
mbBidRewardVideoHandler.showFromBid();
Therefore, for each ad format, we can just have a base class:
com/google/ads/mediation/mintegral
MintegralBannerAd.java
MintegralInterstitialAd.java
MintegralNativeAd.java
MintegralRewardedAd.java
And have the waterfall and bidding classes extend from it (in two different waterfall and rtb directories`:
waterfall
rtb
com/google/ads/mediation/mintegral/waterfall
MintegralWaterfallBannerAd.java
MintegralWaterfallInterstitialAd.java
MintegralWaterfallNativeAd.java
MintegralWaterfallRewardedAd.java
com/google/ads/mediation/mintegral/rtb
MintegralRtbBannerAd.java
MintegralRtbInterstitialAd.java
MintegralRtbNativeAd.java
MintegralRtbRewardedAd.java
See how we do it in another adapter:
@junjunsong
=======================================
Looking at the waterfall code, it's basically the same as the bidding, except the below class(es) and method(s), but they are using the same listeners:
mbBannerView.load();
v.s.mbBannerView.loadFromBid(bidToken);
mbNewInterstitialHandler
v.s.mbBidNewInterstitialHandler
mbNewInterstitialHandler.load();
v.s.mbBidNewInterstitialHandler.loadFromBid(bidToken);
mbNewInterstitialHandler.show();
v.s.mbBidNewInterstitialHandler.showFromBid();
mbNativeHandler
v.s.mbBidNativeHandler
mbNativeHandler.load();
v.s.mbBidNativeHandler.bidLoad(bidToken);
mbRewardVideoHandler
v.s.mbBidRewardVideoHandler
mbRewardVideoHandler.load();
v.s.mbBidRewardVideoHandler.loadFromBid(bidToken);
mbRewardVideoHandler.show();
v.s.mbBidRewardVideoHandler.showFromBid();
=======================================
Therefore, for each ad format, we can just have a base class:
com/google/ads/mediation/mintegral
MintegralBannerAd.java
MintegralInterstitialAd.java
MintegralNativeAd.java
MintegralRewardedAd.java
And have the waterfall and bidding classes extend from it (in two different
waterfall
andrtb
directories`:com/google/ads/mediation/mintegral/waterfall
MintegralWaterfallBannerAd.java
MintegralWaterfallInterstitialAd.java
MintegralWaterfallNativeAd.java
MintegralWaterfallRewardedAd.java
com/google/ads/mediation/mintegral/rtb
MintegralRtbBannerAd.java
MintegralRtbInterstitialAd.java
MintegralRtbNativeAd.java
MintegralRtbRewardedAd.java
See how we do it in another adapter: