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

How to detect a user clicked on "AppOpenAd OR Interstitial" ad ?

Open victorvhpg opened this issue 2 years ago • 1 comments

How to detect a user clicked on "AppOpenAd OR Interstitial" ad ? I need prevent fraud ...

victorvhpg avatar Aug 25 '21 20:08 victorvhpg

for Interstitial ads, use following- when ads is clicked -

 @Override
                public void onAdImpression() {
                    super.onAdImpression();
                }

when dismissed (close button clicked) -

public void onAdDismissedFullScreenContent() {
                    // Called when fullscreen content is dismissed.
                    Log.d("TAG", "The ad was dismissed.");
                }

for AppOpenAd - when ads is clicked -

 @Override
                        public void onAdImpression() {
                            super.onAdImpression();
                        }

when dismissed (continue to app clicked) -

FullScreenContentCallback() {
                        @Override
                        public void onAdDismissedFullScreenContent() {
                         
                   }

rasmus6992 avatar Sep 27 '21 07:09 rasmus6992