I have an Interstitial admob in an activity and when I press a button I put the following lines of code:
botaoid.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (mInterstitialAd.isLoaded()) {
mInterstitialAd.show();
} else {
startActivity(new Intent(mainTela.this,telaSecundaria.class));
}
}
});
The problem is that the Interstitial is opening when the Secondary screen is being closed, how do you first make the Interstitial open and that when closed close the Secondary screen?