googleads-mobile-android-examples icon indicating copy to clipboard operation
googleads-mobile-android-examples copied to clipboard

How to detect if user click on interstitial ad?

Open lemontechnology73 opened this issue 4 years ago • 1 comments

How to detect if user clicked on interstitial ad. There is no callback for ad click please add call back for interstitial ad click.

lemontechnology73 avatar Oct 04 '21 11:10 lemontechnology73

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();
                }

            });

rasmus6992 avatar Oct 06 '21 11:10 rasmus6992