admob - Android interstitial only displaying once -


i can display once, when request ad or try display same ad again not work..it displays once no matter do. tried

i have oncreate

protected void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.activity_main);     toolbar toolbar = (toolbar) findviewbyid(r.id.toolbar);     setsupportactionbar(toolbar);    minterstitialad = new interstitialad(this); minterstitialad.setadunitid(getstring(r.string.interstitial_ad_unit_id)); adrequest adrequestinterstial =  new adrequest.builder()         .addtestdevice("xxxxxxxxxxxxxxxxxxx")         .build(); minterstitialad.loadad(adrequestinterstial); 

then have summoning code

  if(minterstitialad.isloaded()){                         minterstitialad.show();                        requestnewinterstitial();                     } 

and requestnewinterstitial code:

private void requestnewinterstitial() {     adrequest adrequest = new adrequest.builder()             .addtestdevice(adrequest.device_id_emulator)             .addtestdevice("xxxxxxxxxxxxxxxxxxxxxxx")             .build();      minterstitialad.loadad(adrequest); } 

thank you.

//listner adclosed fixed situation minterstitialad.setadlistener(new adlistener() {     @override     public void onadclosed() {         adrequest adrequest =  new adrequest.builder()                 .addtestdevice("xxxxxxxxxxxxxxxxxx")                 .build();         minterstitialad.loadad(adrequest);     } }); 

Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -