Summary: Methods | [Expand All]
public interface

# CustomEvent

com.google.android.gms.ads.mediation.customevent.CustomEvent

Known Indirect Subclasses CustomEventBanner, CustomEventInterstitial, CustomEventNative
CustomEventBanner | A custom event to support banner ads.
CustomEventInterstitial | A custom event that supports interstitial ads.
CustomEventNative | A custom event to support native ads.

## Class Overview

A `CustomEvent` is similar to a `MediationAdapter` except that it is a completely self-service mechanism for publishers to create their own adapter.

The most common use case for a `CustomEvent` is to add support for an ad network that doesn't already provide its own `MediationAdapter`.

There is no reason to implement this interface directly. Instead, custom events should implement `CustomEventBanner` and `CustomEventInterstitial`.

## Summary

Public Methods
abstract void | onDestroy() Tears down the adapter control.
abstract void | onPause() Called when the application calls `pause()`.
abstract void | onResume() Called when the application calls `resume()`.

## Public Methods

#### public abstract void onDestroy ()

Tears down the adapter control.

This is called at the end of the custom event'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.

#### public abstract void onPause ()

Called when the application calls `pause()`. The custom event is expected to pause any processing associated with the ad being shown.

#### public abstract void onResume ()

Called when the application calls `resume()`. The adapter is expected to resume any processing associated with the ad being shown.