| Modifier and Type | Class and Description |
|---|---|
static interface |
NativeBannerAd.NativeBannerAdListener |
static interface |
NativeBannerAd.NativeBannerAdMediaListener |
adConfig, metricFactory| Constructor and Description |
|---|
NativeBannerAd(int slotId,
android.content.Context context)
Public constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAdChoicesPlacement()
Retrieve current position for AdChoices icon
|
java.lang.String |
getAdSource()
Get the name of source network.
|
float |
getAdSourcePriority()
Ad Source Priority is the value representing current ad network place in the queue of
received advertisements.
|
NativeBanner |
getBanner()
Banner model for current ad.
|
int |
getCachePolicy()
Retrieve current cachePolicy set previously
|
NativeBannerAd.NativeBannerAdListener |
getListener()
Get events listener of an advertisement
|
NativeBannerAd.NativeBannerAdMediaListener |
getMediaListener()
Gets listener for media objects events, such as icon loading
|
void |
handleData(java.lang.String data)
Loads data for s2s partners
|
void |
handleSection(NativeAdSection section) |
boolean |
isMediationEnabled()
Get enable/disable mediation flag
|
void |
load()
Start loading ads.
|
void |
loadFromBid(java.lang.String bidId)
Start loading ad with the bidding ID
|
void |
registerView(android.view.View view)
Registration of the Advertising view.
|
void |
registerView(android.view.View view,
java.util.List<android.view.View> clickableViews)
Registration of the Advertising view.
|
void |
setAdChoicesPlacement(int adChoicesPlacement)
Sets the place for AdChoices icon, by default
used top-right position
|
void |
setCachePolicy(int cachePolicy)
By default, images and videos are preloaded.
|
void |
setListener(NativeBannerAd.NativeBannerAdListener listener)
Set events listener of an advertisement
Must be called before
load() |
void |
setMediaListener(NativeBannerAd.NativeBannerAdMediaListener mediaListener)
Sets listener for media objects events, such as icon loading
|
void |
setMediationEnabled(boolean mediationEnabled)
Enables/disables mediation for current ad.
|
void |
unregisterView()
View de-registration.
|
getCustomParams, isLoadCalledpublic NativeBannerAd(int slotId,
@NonNull
android.content.Context context)
slotId - your slot idcontext - app context@Nullable public NativeBannerAd.NativeBannerAdListener getListener()
NativeBannerAd.NativeBannerAdListenerpublic void setListener(@Nullable
NativeBannerAd.NativeBannerAdListener listener)
load()NativeBannerAd.NativeBannerAdListener@Nullable public NativeBanner getBanner()
NativeBannerpublic int getAdChoicesPlacement()
getAdChoicesPlacement in interface INativeAdAdChoicesPlacementpublic void setAdChoicesPlacement(int adChoicesPlacement)
setAdChoicesPlacement in interface INativeAdadChoicesPlacement - positionAdChoicesPlacementpublic final void load()
Ad listener should be added before this call
public void loadFromBid(@NonNull
java.lang.String bidId)
loadFromBid in interface INativeAdbidId - bidding IDpublic final void handleSection(@NonNull
NativeAdSection section)
public final void registerView(@NonNull
android.view.View view,
@Nullable
java.util.List<android.view.View> clickableViews)
registerView in interface INativeAdview - Advertising viewclickableViews - specific clickable views inside Advertising view. If set, the only
views in this list will be clickable. Otherwise, whole view will be
clickablepublic final void registerView(@NonNull
android.view.View view)
registerView in interface INativeAdview - Advertising viewpublic int getCachePolicy()
getCachePolicy in interface INativeAdCachePolicypublic void setMediationEnabled(boolean mediationEnabled)
mediationEnabled - if true - enable mediation, otherwise notpublic boolean isMediationEnabled()
public void setCachePolicy(int cachePolicy)
setCachePolicy in interface INativeAdcachePolicy - cache policy needed CachePolicypublic final void unregisterView()
unregisterView in interface INativeAd@Nullable public java.lang.String getAdSource()
public void handleData(@NonNull
java.lang.String data)
handleData in interface INativeAddata - s2s datapublic float getAdSourcePriority()
@Nullable public NativeBannerAd.NativeBannerAdMediaListener getMediaListener()
NativeBannerAd.NativeBannerAdMediaListenerpublic void setMediaListener(@Nullable
NativeBannerAd.NativeBannerAdMediaListener mediaListener)
mediaListener - listener objectNativeBannerAd.NativeBannerAdMediaListener