简体   繁体   中英

how I can show interstitial ads with a random presentation

hello I want to show interstitial ads with a random click on button example if I click on wallpaper 3 times the interstitial ads is showing up I want to add a function to showing Interstitial randomly after click, between 3 to 10 click

this my code :

if (Config.Counter == 2){
Config.Counter = 0;
new InterstitialAdMobModel(activity);
}else{
Config.Counter ++;
}
                if (Config.Counter >= random ){

                    Random rand = new Random();
                    random = rand.nextInt((max - min + 1) + min);
                    new  InterstitialAdMobModel(activity);
                    Config.Counter = 0;
                }else{
                    Config.Counter ++;

                }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM