MediationAdapter

interface MediationAdapter : MediationExtrasReceiver

Known direct subclasses
MediationBannerAdapter

This interface is deprecated. Use [com.google.android.gms.ads.mediation.Adapter] instead

MediationInterstitialAdapter

This interface is deprecated. Use [com.google.android.gms.ads.mediation.Adapter] instead.

MediationNativeAdapter

This interface is deprecated. Use [com.google.android.gms.ads.mediation.Adapter] instead


Adapter for third party ad networks.

Summary

Nested types

Builder class to specify adapter information.

Constants

const Int

Specifies that the adapter supports delayed impressions.

const Int

Specifies that the adapter supports specifying a floor cpm value per ad request.

const Int

Specifies that the adapter supports returning a floor cpm value per ad response.

Public functions

Unit

Tears down the adapter control.

Unit

Called when the application calls onPause on the ad view.

Unit

Called when the application calls onResume on the ad view.

Constants

CAPABILITIES_DELAYED_IMPRESSIONS

const val CAPABILITIES_DELAYED_IMPRESSIONS = 1: Int

Specifies that the adapter supports delayed impressions.

CAPABILITIES_FLOOR_CPM

const val CAPABILITIES_FLOOR_CPM = 2: Int

Specifies that the adapter supports specifying a floor cpm value per ad request.

CAPABILITIES_RETURNS_CPM

const val CAPABILITIES_RETURNS_CPM = 4: Int

Specifies that the adapter supports returning a floor cpm value per ad response.

Public functions

onDestroy

fun onDestroy(): Unit

Tears down the adapter control.

This is called at the end of the mediator's life cycle. The adapter is expected to release any resources and shut down. After this method is called, any subsequent calls to any other method on this adapter may throw an IllegalStateException.

This method is not guaranteed to be called. There are a number of reasons that this method can be skipped, such as a force close of the application.

onPause

fun onPause(): Unit

Called when the application calls onPause on the ad view. The adapter is expected to pause any processing associated with the ad being shown.

onResume

fun onResume(): Unit

Called when the application calls onResume on the ad view. The adapter is expected to resume any processing associated with the ad being shown.