my interstitial ads and banner ads is working good but the rewarded ad is not working. There is my code . the other ads is working good , what is the problem ? what im a missing ? thanks for help. the other ads is working good , what is the problem ? what im a missing ? thanks for help.
InterstitialAdListener interstitialAdListener = new InterstitialAdListener() {
@Override
public void onInterstitialDisplayed(Ad ad) {
// Interstitial ad displayed callback
}
@Override
public void onInterstitialDismissed(Ad ad) {
// Interstitial dismissed callback
}
@Override
public void onError(Ad ad, AdError adError) {
// Ad error callback
}
@Override
public void onAdLoaded(Ad ad) {
// Interstitial ad is loaded and ready to be displayed
// Show the ad
interstitialAd.show();
}
@Override
public void onAdClicked(Ad ad) {
// Ad clicked callback
}
@Override
public void onLoggingImpression(Ad ad) {
// Ad impression logged callback
}
};
interstitialAd.loadAd(
interstitialAd.buildLoadAdConfig()
.withAdListener(interstitialAdListener)
.build());
if (interstitialAd==null){
interstitialAd.loadAd();
public void goActivity(View view){
progressBar.setVisibility(View.VISIBLE);
Intent intent = new Intent(getApplicationContext(), activity2.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getApplicationContext().startActivity(intent);
progressBar.setVisibility(View.INVISIBLE);
if (interstitialAd.isAdLoaded()) {
Toast.makeText(this,"YES",Toast.LENGTH_SHORT).show();
interstitialAd.show(); }
}