Stay organized with collections
Save and categorize content based on your preferences.
firebase::
gma::
AdListener
#include <types.h>
A listener for receiving notifications during the lifecycle of a BannerAd.
Summary
Constructors and Destructors
virtual void
Called when a click is recorded for an ad.
virtual void
Called when the user is about to return to the application after clicking on an ad.
virtual void
Called when an impression is recorded for an ad.
virtual void
Called when an ad opens an overlay that covers the screen.
Public functions
OnAdClicked
virtual
void
OnAdClicked
()
Called when a click is recorded for an ad.
OnAdClosed
virtual
void
OnAdClosed
()
Called when the user is about to return to the application after clicking on an ad.
OnAdImpression
virtual
void
OnAdImpression
()
Called when an impression is recorded for an ad.
OnAdOpened
virtual
void
OnAdOpened
()
Called when an ad opens an overlay that covers the screen.
~AdListener
virtual
~
AdListener
()
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[],["The `AdListener` class provides notifications for `BannerAd` lifecycle events. Key actions include `OnAdClicked` (a click is recorded), `OnAdClosed` (user returns to the app after ad interaction), `OnAdImpression` (an ad impression is recorded), and `OnAdOpened` (an ad overlay opens). It also includes a destructor `~AdListener`. These actions represent virtual functions that are called during specific ad interactions and visibility changes.\n"]]