public abstract class CustomEventNative
extends java.lang.Object
CustomEventNative is a base class for custom events that support native ads. By
implementing subclasses of CustomEventNative, you can enable the MoPub SDK to support a
wider variety of third-party ad networks, or execute any of your application code on demand.
At runtime, the MoPub SDK will find and instantiate a CustomEventNative subclass as
needed and invoke its loadNativeAd(android.content.Context, com.mopub.nativeads.CustomEventNative.CustomEventNativeListener, java.util.Map<java.lang.String, java.lang.Object>, java.util.Map<java.lang.String, java.lang.String>) method.| Modifier and Type | Class and Description |
|---|---|
static interface |
CustomEventNative.CustomEventNativeListener |
| Constructor and Description |
|---|
CustomEventNative() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
loadNativeAd(android.content.Context context,
CustomEventNative.CustomEventNativeListener customEventNativeListener,
java.util.Map<java.lang.String,java.lang.Object> localExtras,
java.util.Map<java.lang.String,java.lang.String> serverExtras)
When the MoPub SDK receives a response indicating it should load a custom event, it will send
this message to your custom event class.
|
protected abstract void loadNativeAd(android.content.Context context,
CustomEventNative.CustomEventNativeListener customEventNativeListener,
java.util.Map<java.lang.String,java.lang.Object> localExtras,
java.util.Map<java.lang.String,java.lang.String> serverExtras)
CustomEventNative.CustomEventNativeListener Object of certain lifecycle events.context - The context.customEventNativeListener - An Object that must be notified of certain lifecycle
events.localExtras - A Map containing additional custom data that is set within your
application by calling MoPubNative.setLocalExtras(Map). Note that the
localExtras Map is a copy of the Map supplied to MoPubNative.setLocalExtras(Map).serverExtras - A Map containing additional custom data configurable on the MoPub website
that you want to associate with a given custom event request. This data may be used to pass
dynamic information, such as publisher IDs, without changes in application code.