Android - new Interstitial Ad not Loading (Admob) -
i'm trying test interstitial ads in app, , first interstitial works fine. however, when request new, second ad using minterstitialad.loadad(new adrequest.builder().build())
, onadloaded() never called.
my adlistener, if helps:
minterstitialad.setadlistener(new adlistener() { @override public void onadloaded() { adisloaded = true; } @override public void onadopened() { minterstitialad.loadad(new adrequest.builder().build()); adisloaded = false; adistimeready = false; } @override public void onadclosed() { new countdowntimer(adinterval, adinterval) { //timer show new ad if atleast interval of time has passed public void ontick(long millisuntilfinished) {} public void onfinish() { adistimeready = true; } }.start();
i using emulator, ads test ads. there 1 test ad or something, , new ad can't requested?
thanks, stephen
it seems issue was trying load new ad before previous 1 closed. below deleted onadopened method , moved contents onadclosed method.
minterstitialad.setadlistener(new adlistener() { @override public void onadloaded() { adisloaded = true; } @override public void onadclosed() { minterstitialad.loadad(new adrequest.builder().build()); adisloaded = false; adistimeready = false; new countdowntimer(adinterval, adinterval) { public void ontick(long adinterval) {} public void onfinish() { adistimeready = true; } }.start(); } });
Comments
Post a Comment