i need to show the ad before the activity show the ui, so I need to set a delay (5 secs more or less), in that time I need to test if ad is ready, and eventually show it, after 5 secs, the activity need to show the ui in all case.
I have tried this :
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
public void run() {
ricevuto = 1;
}
}, 6000);
do {interstitial.show();}
while (ricevuto == 0);
but it loop forever.