private static final String MoPubInterstitialID = "xxxxxxxxxxxxx";
private MoPubInterstitial moPubInterstitial;
moPubInterstitial = new MoPubInterstitial(this, MoPubInterstitialID);
moPubInterstitial.setInterstitialAdListener(this);
moPubInterstitial.load();
moPubInterstitialButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Log.d("MoPub", "Interstitial button clicked");
if ( moPubInterstitial.isReady() )
{
Log.d("MoPub", "Interstitial is Ready");
moPubInterstitial.show();
Log.d("MoPub", "Interstial Shown");
moPubInterstitial.forceRefresh();
}
}
});
这些都是我为使它工作而采取的所有步骤。如果您有任何问题,请告诉我。