While tracking my ads I notice a high amount of interstitial ads fail to load. The ads are supposed to show when the user takes a major action like sending a text message. I call my ads in onCreate like this in OnCreate.
interstitialAd = new InterstitialAd(this);
interstitialAd.setAdUnitId("sometext");
AdRequest adRequest1 = new AdRequest.Builder().build();
interstitialAd.loadAd(adRequest1);
interstitialAd.setAdListener(new AdListener() {
@Override
public void onAdLoaded() {
super.onAdLoaded();
}
public void onAdClosed() {
}
@Override
public void onAdFailedToLoad(int errorCode) {
}
});
Is there a way to load the ads when the application starts and show the ads in my OnCreate of different activities? I really think I want to create a method that extends the Application to load the ads. Is that the correct path to take? If so how do i call to load the ad as soon as the application starts?