Package org.prebid.mobile
Class PrebidNativeAd
-
- All Implemented Interfaces:
public class PrebidNativeAdResponse native ad object for all assets.
-
-
Field Summary
Fields Modifier and Type Field Description public final ArrayList<NativeTitle>titlespublic final ArrayList<NativeImage>imagespublic final ArrayList<NativeData>dataListpublic StringclickUrlpublic StringwinEventpublic StringimpEventpublic StringprivacyUrl
-
Method Summary
Modifier and Type Method Description ArrayList<NativeTitle>getTitles()ArrayList<NativeImage>getImages()ArrayList<NativeData>getDataList()StringgetClickUrl()StringgetWinEvent()StringgetImpEvent()StringgetPrivacyUrl()static PrebidNativeAdcreate(String cacheId)voidaddTitle(NativeTitle title)voidaddData(NativeData data)voidaddImage(NativeImage image)StringgetTitle()StringgetDescription()StringgetIconUrl()StringgetImageUrl()StringgetCallToAction()StringgetSponsoredBy()booleanregisterView(View container, List<View> clickableViews, PrebidNativeAdEventListener listener)This API is used to register the view for Ad Events (#onAdClicked(), #onAdImpression, #onAdExpired). -
-
Method Detail
-
getTitles
ArrayList<NativeTitle> getTitles()
-
getImages
ArrayList<NativeImage> getImages()
-
getDataList
ArrayList<NativeData> getDataList()
-
getClickUrl
String getClickUrl()
-
getWinEvent
String getWinEvent()
-
getImpEvent
String getImpEvent()
-
getPrivacyUrl
String getPrivacyUrl()
-
create
static PrebidNativeAd create(String cacheId)
-
addTitle
void addTitle(NativeTitle title)
-
addData
void addData(NativeData data)
-
addImage
void addImage(NativeImage image)
-
getDescription
String getDescription()
- Returns:
First description data value or empty string if it doesn't exist
-
getIconUrl
String getIconUrl()
- Returns:
First icon url or empty string if it doesn't exist
-
getImageUrl
String getImageUrl()
- Returns:
First main image url or empty string if it doesn't exist
-
getCallToAction
String getCallToAction()
- Returns:
First call to action data value or empty string if it doesn't exist
-
getSponsoredBy
String getSponsoredBy()
- Returns:
First sponsored by data value or empty string if it doesn't exist
-
registerView
boolean registerView(View container, List<View> clickableViews, PrebidNativeAdEventListener listener)
This API is used to register the view for Ad Events (#onAdClicked(), #onAdImpression, #onAdExpired).
- Parameters:
container- the native ad container used to track impressionclickableViews- list of views that should handle clicklistener- must not contain any references to View, Activity, because it can be in memory for a long time.- Returns:
true if views registered successfully
-
-
-
-