How to notify user before loading Interstitial Ad

Related searches

Currently in my application I am showing ad when user click on button or move to new activity, what I want to do is notify user before loading ad. I want to show message like Ad is loading...! and after 2-3 sec that msg should disappear. In short I want to show dialog on preload of ad. I was trying this with help of alert msg but that is not working, I am not sure where we need to add alert dialog.

Please help...!

Thanks in Advance...!

You can use a Thread that count down for x sec, every sec the textView will change (it will be a number) and then the user will get the feeling of counts down

public CountDownThread extend Thread { 

private int mTotalNum;
private CountDownListener mCuntDownListener;

public CountDownThread(int totalNum, CountDownListener countDownListener) {
   this.mTotalNum = totalNum
   this.mCountDownListener = countDownListener

public void run(){
  while (mTotalNum > 0) {
      try {
      }catch (InterruptedException e){

In your activity:

1) You need to implement CountDownListener (When you implement the CountDownListener you will have to implement the onCountDownThreadDone() method, there you need to implement your dailog box). 2) In addition, you will need to call to CountDownThread(3, this) (3 is your display time in sec, this is the listener).

This is the interface:

public interface CountDownListener {
    void onCountDownThreadDone();

After the count down (in your case 3 sec) is finished, the onCountDownThreadDone() method will be called (look at run() method in CountDownThread class). Then the implementation of your dailog box will appear (you implement it in your Activity).

Custom Events for Banner and Interstitial Ads, Before you can integrate custom events for banner or interstitial ads, you Typically, this parameter is an identifier that enables the custom event to determine which ad to load. events if the user calls the AdView.pause() and AdView.resume() methods. Note: You are required to notify AdMob mediation of all callbacks. Placing an interstitial ad after every user action, including but not limited to clicks, swipes, etc. You should place no more than one interstitial ad after every two user actions within your app. Please note that this requirement also applies when a user clicks the Back button within the app.

You can use a CountDownTimer as below, First, toast message show up then 3 sec.(3000msec) later your ad code will run

        Toast.makeText(this, "Ad is loading...", Toast.LENGTH_LONG).show();

        new CountDownTimer(3000, 1000) {
            public void onTick(long millisUntilFinished) {


            public void onFinish() {  // runs after 2 sec. (2000 msec.)
                // This is the place where you call your interstitial ad.

What are Interstitial Ads & How to Use Them Without Being Penalized, Interstitial ads are beneficial to marketers but only when using best Whereas interstitial video ads may have up to a 5-second delay before providing a close option: Interstitial ads used for cookie consent notifications as required by users, consider inserting a delay (a “loading” or “please wait” screen,� The AdTiming SDK fires several events to inform you of Ad activity. To show Ad to your user, you need to setup its Delegate before loading the ads to receive Ad status. The following snippets demonstrates how to configure Delegate for AdTimingInterstitial object and implement the AdTimingInterstitialDelegate to receive Ad events. 1.

I achieved this by using following code

/* Show your dialog */


/* following code will run after 3000ms */

    new Handler().postDelayed(new Runnable() {

                        public void run() {
                            // TODO Auto-generated method stub

                    }, 3000);

Is it recommended request new ad immediately after an interstitial , pre-load an ad(request new ad) every time an ad closed via onAdClosed(). Same as above but I add delay before pre-load the ad, maybe 5� If an app requires frequent tapping by users, consider inserting a delay (a “loading” or “please wait” screen, or a progress bar or wheel) after the end of a level, before your interstitial ad shows. This gives users a chance to stop tapping the screen and carefully consider what appears next — again, helping to reduce accidental

bring up a dialog containing text before the ad is displayed, I have used the dialog before the Interstitial ad is displayed. The dialog contains the text "Loading Ads, Please wait. Thank you for using our� If an app encourages frequent and/or repeated tapping by users, it is recommended that a delay is inserted after the end of a level and before the display of an interstitial ad. This delay could take the form of a loading or please wait screen, or a progress-bar/wheel.

InterstitialAd - Firebase, Just make sure you replace it with your own ad unit ID before publishing your app. For more information about how the Mobile Ads SDK's test ads work, see Test Ads. Load an ad Note: Make all calls to the Mobile Ads SDK on the main thread. To load an interstitial ad, call the InterstitialAd object's loadAd() method.

Any UI interaction or updates resulting from ironSource’s callbacks need to be passed to the main thread before executing. Step 2. Load Interstitial Ad. We recommend requesting an Interstitial Ad a short while before you plan on showing it to your users as the loading process can take time. To request an interstitial ad, call the following

  • sorry can you please explain more? or any example will help me for better understanding. I want to just display dialog box for 3-4 sec with no action, so user can understand ad is loading.
  • Hi, i've edit my answer... hope it is more clear now
  • sorry can you please explain more? or any example will help me for better understanding. I want to just display dialog box for 3-4 sec with no action, so user can understand ad is loading.
  • @MagicduetoLogic Edited my answer.