public class GAMNativeEventHandler extends com.pubmatic.sdk.nativead.POBNativeAdEvent implements GAMNativeConfiguration
Please refer: GAM Native Overview GAM NativeCustomFormatAd
GAMNativeConfiguration.GAMAdTypes, GAMNativeConfiguration.NativeAdRendererListener, GAMNativeConfiguration.NativeCustomFormatAdRendererListener| Constructor and Description |
|---|
GAMNativeEventHandler(android.content.Context context,
java.lang.String adUnitId,
java.lang.String openWrapFormatId,
GAMNativeConfiguration.GAMAdTypes... adTypes)
Constructor to initialize required properties using that Event Handler build ad request.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNativeCustomFormatAd(java.lang.String customFormatId,
com.google.android.gms.ads.nativead.NativeCustomFormatAd.OnCustomClickListener customClickListener)
Enables the GAMNativeEventHandler to load custom format ads through GAMs API.
|
com.pubmatic.sdk.nativead.POBNativeAdEventBridge |
createNativeAdEventBridge() |
void |
setConfigListener(GAMConfigListener configListener)
With configListener publisher can configure the ad request properties on the provided objects.
|
void |
setNativeAdOptions(com.google.android.gms.ads.nativead.NativeAdOptions nativeAdOptions)
Used to configure native ad requests by additional customizations like setReturnUrlsForImageAssets,
setAdChoicesPlacement, setMediaAspectRatio, etc.
|
void |
setNativeAdRendererListener(GAMNativeConfiguration.NativeAdRendererListener nativeAdRendererListener)
Used for runtime rendering of
NativeAd by providing native ad rendering on the app side |
void |
setNativeCustomFormatAdRendererListener(GAMNativeConfiguration.NativeCustomFormatAdRendererListener nativeCustomFormatAdRendererListener)
Used for runtime rendering of
NativeCustomFormatAd by providing native ad rendering on the app side |
public GAMNativeEventHandler(@NonNull
android.content.Context context,
@NonNull
java.lang.String adUnitId,
@NonNull
java.lang.String openWrapFormatId,
@NonNull
GAMNativeConfiguration.GAMAdTypes... adTypes)
context - Instance of application contextadUnitId - GAM ad unit idopenWrapFormatId - Custom format ID defined in the Ad Manager UI for openwrap creativeadTypes - varargs containing ad type GAMAdTypes@NonNull public com.pubmatic.sdk.nativead.POBNativeAdEventBridge createNativeAdEventBridge()
createNativeAdEventBridge in class com.pubmatic.sdk.nativead.POBNativeAdEventpublic void setNativeAdOptions(@Nullable
com.google.android.gms.ads.nativead.NativeAdOptions nativeAdOptions)
GAMNativeConfigurationNativeAdOptions object allows apps to set specific options used in making the requestsetNativeAdOptions in interface GAMNativeConfigurationnativeAdOptions - Instance of NativeAdOptionspublic void setConfigListener(@Nullable
GAMConfigListener configListener)
GAMNativeConfigurationsetConfigListener in interface GAMNativeConfigurationconfigListener - Instance of GAMConfigListenerpublic void setNativeAdRendererListener(@Nullable
GAMNativeConfiguration.NativeAdRendererListener nativeAdRendererListener)
GAMNativeConfigurationNativeAd by providing native ad rendering on the app sidesetNativeAdRendererListener in interface GAMNativeConfigurationnativeAdRendererListener - Instance of GAMNativeConfiguration.NativeAdRendererListenerpublic void setNativeCustomFormatAdRendererListener(@Nullable
GAMNativeConfiguration.NativeCustomFormatAdRendererListener nativeCustomFormatAdRendererListener)
GAMNativeConfigurationNativeCustomFormatAd by providing native ad rendering on the app sidesetNativeCustomFormatAdRendererListener in interface GAMNativeConfigurationnativeCustomFormatAdRendererListener - Instance of GAMNativeConfiguration.NativeCustomFormatAdRendererListenerpublic void addNativeCustomFormatAd(@NonNull
java.lang.String customFormatId,
@Nullable
com.google.android.gms.ads.nativead.NativeCustomFormatAd.OnCustomClickListener customClickListener)
GAMNativeConfigurationaddNativeCustomFormatAd in interface GAMNativeConfigurationcustomFormatId - Custom format ID defined in the Ad Manager UI.customClickListener - An optional listener to define custom click logic for ad clicks.
When set, this overrides the ad's default click through behavior of navigating to the click URL defined in the Ad Manager UI.