Interface AdUnitCallback
-
- All Implemented Interfaces:
-
com.inmobi.media.ads.common.listeners.FullScreenListener
public interface AdUnitCallback implements FullScreenListener
Comprehensive callback interface for ad unit lifecycle and interaction events.
This interface extends FullScreenListener and provides callbacks for critical ad unit events including load failures, user interactions, application navigation, and impression tracking. It serves as the primary communication channel between ad units and their managing components, enabling proper error handling, user interaction tracking, and telemetry collection.
-
-
Method Summary
Modifier and Type Method Description abstract UnitonLoadFailure(Short errorCode, InMobiAdRequestStatus status)Called when an ad load operation has failed. abstract UnitonAdClicked(Map<Object, Object> params)Called when a user clicks on the ad. abstract UnitonUserLeftApplication()Called when the user leaves the application due to ad interaction. abstract UnitonAdImpression(TelemetryOnAdImpression telemetryOnAdImpression)Called when an ad impression is recorded. -
-
Method Detail
-
onLoadFailure
abstract Unit onLoadFailure(Short errorCode, InMobiAdRequestStatus status)
Called when an ad load operation has failed.
This method is invoked when the ad unit encounters an error during the loading process, providing both an error code for categorization and a status object with detailed failure information.
- Parameters:
errorCode- A short value indicating the specific type of load failurestatus- The InMobiAdRequestStatus containing detailed error information
-
onAdClicked
abstract Unit onAdClicked(Map<Object, Object> params)
Called when a user clicks on the ad.
This method is invoked when the user interacts with the ad content by clicking or tapping, providing additional parameters about the interaction context and metadata.
- Parameters:
params- A map containing click-related parameters and metadata
-
onUserLeftApplication
abstract Unit onUserLeftApplication()
Called when the user leaves the application due to ad interaction.
This method is invoked when an ad interaction causes the user to navigate away from the current application, typically to an external browser, app store, or another application.
-
onAdImpression
abstract Unit onAdImpression(TelemetryOnAdImpression telemetryOnAdImpression)
Called when an ad impression is recorded.
This method is invoked when the ad has been successfully displayed and an impression event is tracked. It may include optional telemetry data for detailed impression analytics and reporting.
- Parameters:
telemetryOnAdImpression- Optional TelemetryOnAdImpression data for detailed tracking
-
-
-
-