1. Set up the banner ad delegate method
Yodo1Mas.getInstance().setBannerListener(new Yodo1Mas.BannerListener() {
@Override
public void onAdOpened(@NonNull Yodo1MasAdEvent event) {
}
@Override
public void onAdError(@NonNull Yodo1MasAdEvent event, @NonNull Yodo1MasError error) {
}
@Override
public void onAdClosed(@NonNull Yodo1MasAdEvent event) {
}
});
2. Check the banner ad load status
boolean isLoaded = Yodo1Mas.getInstance().isBannerAdLoaded();
3. Show banner ad
The method using the default parameters, align: Yodo1Mas.BannerTop | Yodo1Mas.BannerHorizontalCenter
and offset(X: 0,Y: 0)
Yodo1Mas.getInstance().showBannerAd(MyActivity.this);
Using the default offset(X: 0, Y: 0), you can customize the banner alignment.
int align = Yodo1Mas.BannerTop | Yodo1Mas.BannerHorizontalCenter;
Yodo1Mas.getInstance().showBannerAd(MyActivity.this, align);
The method can be uses to customize the banner alignment and offset.
int align = Yodo1Mas.BannerTop | Yodo1Mas.BannerHorizontalCenter;
int offsetX = 10;
int offsetY = 10;
Yodo1Mas.getInstance().showBannerAd(MyActivity.this, align, offsetX, offsetY);
4. Dismiss banner ad
Yodo1Mas.getInstance().dismissBannerAd();
Comments
0 comments
Please sign in to leave a comment.