package com.app.rewardapp.adsManager;

import android.app.Activity;
import android.view.View;

public class AdManager implements AdImp{
     Activity activity;
     Banner.Builder bannerAd;
     Interstital.Builder interstitalAd;
     public static int Count=0;

    public AdManager(Activity activity){
        this.activity=activity;
        bannerAd=new Banner.Builder(activity);
        interstitalAd=new Interstital.Builder(activity);
    }

    public void loadBannerAd(View v){
        bannerAd.setAu(bannerID);
        bannerAd.setbT(bannerType);
        bannerAd.setV(v);
        bannerAd.buildAd();
    }

    public void loadInterstitalAd(){
       if(Count >= interstitalCount){
           interstitalAd.setAu(interstitalID);
           interstitalAd.setiT(InterstitalType);
           interstitalAd.buildAd();
           Count=0;
       }else{
           Count++;
       }
    }


}
