public abstract class StaticNativeAd extends BaseNativeAd implements ImpressionInterface, ClickInterface
BaseNativeAd.NativeEventListener
Constructor and Description |
---|
StaticNativeAd() |
Modifier and Type | Method and Description |
---|---|
void |
addExtra(java.lang.String key,
java.lang.Object value) |
void |
clear(android.view.View view)
Your
BaseNativeAd subclass should implement this method if the network requires the developer
to reset or clear state of the native ad after it goes off screen and before it is rendered
again. |
void |
destroy()
Your
BaseNativeAd subclass should implement this method if the network requires the developer
to destroy or cleanup their native ad when they are permanently finished with it. |
java.lang.String |
getCallToAction()
Returns the Call To Action String (i.e.
|
java.lang.String |
getClickDestinationUrl()
Returns the String url that the device will attempt to resolve when the ad is clicked.
|
java.lang.Object |
getExtra(java.lang.String key)
Given a particular String key, return the associated Object value from the ad's extras map.
|
java.util.Map<java.lang.String,java.lang.Object> |
getExtras()
Returns a copy of the extras map, reflecting additional ad content not reflected in any
of the above hardcoded setters.
|
java.lang.String |
getIconImageUrl()
Returns the String url corresponding to the ad's icon image.
|
int |
getImpressionMinPercentageViewed()
Returns the minimum viewable percentage of the ad that must be onscreen for it to be
considered visible.
|
int |
getImpressionMinTimeViewed()
Returns the minimum amount of time (in milliseconds) the ad that must be onscreen before an
impression is recorded.
|
java.lang.String |
getMainImageUrl()
Returns the String url corresponding to the ad's main image.
|
java.lang.String |
getPrivacyInformationIconClickThroughUrl()
Returns the Privacy Information click through url.
|
java.lang.String |
getPrivacyInformationIconImageUrl()
Returns the Privacy Information image url.
|
java.lang.Double |
getStarRating()
For app install ads, this returns the associated star rating (on a 5 star scale) for the
advertised app.
|
java.lang.String |
getText()
Returns the String corresponding to the ad's body text.
|
java.lang.String |
getTitle()
Returns the String corresponding to the ad's title.
|
void |
handleClick(android.view.View view)
Your
StaticNativeAd subclass should implement this method if the network requires the developer
to explicitly handle click events of views rendered to screen. |
boolean |
isImpressionRecorded() |
void |
prepare(android.view.View view)
Your
BaseNativeAd subclass should implement this method if the network requires the developer
to prepare state for recording an impression or click before a view is rendered to screen. |
void |
recordImpression(android.view.View view)
Your
StaticNativeAd subclass should implement this method if the network requires the developer
to explicitly record an impression of a view rendered to screen. |
void |
setCallToAction(java.lang.String callToAction) |
void |
setClickDestinationUrl(java.lang.String clickDestinationUrl) |
void |
setIconImageUrl(java.lang.String iconImageUrl) |
void |
setImpressionMinTimeViewed(int impressionMinTimeViewed) |
void |
setImpressionRecorded() |
void |
setMainImageUrl(java.lang.String mainImageUrl) |
void |
setPrivacyInformationIconClickThroughUrl(java.lang.String privacyInformationIconClickThroughUrl) |
void |
setPrivacyInformationIconImageUrl(java.lang.String privacyInformationIconImageUrl) |
void |
setStarRating(java.lang.Double starRating) |
void |
setText(java.lang.String text) |
void |
setTitle(java.lang.String title) |
addClickTracker, addClickTrackers, addImpressionTracker, addImpressionTrackers, notifyAdClicked, notifyAdImpressed, setNativeEventListener
public final java.lang.String getTitle()
public final java.lang.String getText()
public final java.lang.String getMainImageUrl()
public final java.lang.String getIconImageUrl()
public final java.lang.String getCallToAction()
public final java.lang.Double getStarRating()
public final java.lang.String getPrivacyInformationIconClickThroughUrl()
setPrivacyInformationIconClickThroughUrl(String)
.null
if not set.public java.lang.String getPrivacyInformationIconImageUrl()
null
if not
set.public final java.lang.Object getExtra(java.lang.String key)
getExtras()
for more information.public final java.util.Map<java.lang.String,java.lang.Object> getExtras()
public final java.lang.String getClickDestinationUrl()
public final void setMainImageUrl(java.lang.String mainImageUrl)
public final void setIconImageUrl(java.lang.String iconImageUrl)
public final void setClickDestinationUrl(java.lang.String clickDestinationUrl)
public final void setCallToAction(java.lang.String callToAction)
public final void setTitle(java.lang.String title)
public final void setText(java.lang.String text)
public final void setStarRating(java.lang.Double starRating)
public final void setPrivacyInformationIconClickThroughUrl(java.lang.String privacyInformationIconClickThroughUrl)
public final void setPrivacyInformationIconImageUrl(java.lang.String privacyInformationIconImageUrl)
public final void addExtra(java.lang.String key, java.lang.Object value)
public final void setImpressionMinTimeViewed(int impressionMinTimeViewed)
public void prepare(android.view.View view)
BaseNativeAd
BaseNativeAd
subclass should implement this method if the network requires the developer
to prepare state for recording an impression or click before a view is rendered to screen.
This method is optional.prepare
in class BaseNativeAd
public void clear(android.view.View view)
BaseNativeAd
BaseNativeAd
subclass should implement this method if the network requires the developer
to reset or clear state of the native ad after it goes off screen and before it is rendered
again.
This method is optional.clear
in class BaseNativeAd
public void destroy()
BaseNativeAd
BaseNativeAd
subclass should implement this method if the network requires the developer
to destroy or cleanup their native ad when they are permanently finished with it.
This method is optional.destroy
in class BaseNativeAd
public void recordImpression(android.view.View view)
StaticNativeAd
subclass should implement this method if the network requires the developer
to explicitly record an impression of a view rendered to screen.
This method is optional.recordImpression
in interface ImpressionInterface
public final int getImpressionMinPercentageViewed()
getImpressionMinTimeViewed()
for
additional impression tracking considerations.getImpressionMinPercentageViewed
in interface ImpressionInterface
public final int getImpressionMinTimeViewed()
getImpressionMinPercentageViewed()
for additional impression tracking considerations.getImpressionMinTimeViewed
in interface ImpressionInterface
public final boolean isImpressionRecorded()
isImpressionRecorded
in interface ImpressionInterface
public final void setImpressionRecorded()
setImpressionRecorded
in interface ImpressionInterface
public void handleClick(android.view.View view)
StaticNativeAd
subclass should implement this method if the network requires the developer
to explicitly handle click events of views rendered to screen.
This method is optional.handleClick
in interface ClickInterface