googleads-mobile-android-examples
googleads-mobile-android-examples copied to clipboard
How to detect if user click on interstitial ad?
How to detect if user clicked on interstitial ad. There is no callback for ad click please add call back for interstitial ad click.
try this :
mInterstitialAd.setFullScreenContentCallback(new FullScreenContentCallback() {
@Override
public void onAdDismissedFullScreenContent() {
// Called when fullscreen content is dismissed.
Log.d("TAG", "The ad was dismissed.");
}
@Override
public void onAdFailedToShowFullScreenContent(AdError adError) {
// Called when fullscreen content failed to show.
Log.d("TAG", "The ad failed to show.");
}
@Override
public void onAdShowedFullScreenContent() {
// Called when fullscreen content is shown.
// Make sure to set your reference to null so you don't
// show it a second time.
mInterstitialAd = null;
Log.d("TAG", "The ad was shown.");
}
@Override
public void onAdImpression() {
super.onAdImpression();
}
});