PictureInPictureAdEventCallback

@ExperimentalApi
interface PictureInPictureAdEventCallback : AdEventCallback


Callback for receiving ad events during the lifecycle of a Picture-in-Picture ad.

This interface extends AdEventCallback and OnAppEventListener to provide standard ad events (such as clicks and impressions) alongside picture-in-picture specific visibility events such as the ad being shown or hidden.

Summary

Public functions

open Unit

Called when the picture-in-picture ad is removed from the screen.

open Unit

Called when the picture-in-picture ad is displayed on the screen.

open Unit
onAppEvent(name: String, data: String?)

Called when an app event occurs.

Inherited functions

From com.google.android.libraries.ads.mobile.sdk.common.AdEventCallback
open Unit

Called when a click is recorded for an ad.

open Unit

Called when the ad dismisses an overlay that it previously showed.

open Unit

Called when the ad fails to show fullscreen content.

open Unit

Called when an impression is recorded for an ad.

open Unit
onAdPaid(value: AdValue)

Called when an ad is estimated to have earned money.

open Unit

Called when an ad opens an overlay that covers the screen, for example an MRAID expanded ad, ad choices overlay, or a full screen ad.

Public functions

onAdHidden

open fun onAdHidden(): Unit

Called when the picture-in-picture ad is removed from the screen. This can occur if the user manually dismisses the ad or if it is programmatically hidden with PictureInPictureAd.hide.

onAdShown

open fun onAdShown(): Unit

Called when the picture-in-picture ad is displayed on the screen.

onAppEvent

open fun onAppEvent(name: String, data: String?): Unit

Called when an app event occurs.

App events allow JavaScript within an ad to trigger events in the application. The ad can trigger the app event with a name and optional data. It is then up to the application to decide how to handle the event.

This feature is only available for Ad Manager publishers.

Parameters
name: String

The name of the app event.

data: String?

Extra data included with the app event. The data can be null.