-
public interface CloudXNativeAdStructured native ad object with individual asset properties.
Unlike banner/interstitial ads which are opaque views, native ads expose individual creative assets (title, body, icon, media, CTA) that publishers arrange in their own custom layout.
Adapter implementations provide concrete classes that override prepareForInteraction to register publisher views with their 3P SDK for click and impression tracking.
-
-
Method Summary
Modifier and Type Method Description abstract BooleanprepareForInteraction(List<View> clickableViews, ViewGroup container)Registers the publisher's clickable views and container with the underlying 3P SDK for click/impression tracking. abstract StringgetTitle()abstract StringgetAdvertiser()abstract StringgetBody()abstract StringgetCallToAction()abstract CloudXNativeAdImagegetIcon()abstract CloudXNativeAdImagegetMainImage()abstract ViewgetMediaView()abstract ViewgetOptionsView()abstract FloatgetMediaContentAspectRatio()abstract DoublegetStarRating()abstract BooleangetIsExpired()BooleangetIsVideoContent()DoublegetVideoDuration()-
-
Method Detail
-
prepareForInteraction
abstract Boolean prepareForInteraction(List<View> clickableViews, ViewGroup container)
Registers the publisher's clickable views and container with the underlying 3P SDK for click/impression tracking.
Called by the SDK core when rendering into a CloudXNativeAdView. Adapters implement this to call their network's registerViewForInteraction / setNativeAd / equivalent.
- Parameters:
clickableViews- Views that should be clickable (CTA button, title, etc.container- The parent ViewGroup containing the native ad layout
-
getAdvertiser
abstract String getAdvertiser()
-
getCallToAction
abstract String getCallToAction()
-
getIcon
abstract CloudXNativeAdImage getIcon()
-
getMainImage
abstract CloudXNativeAdImage getMainImage()
-
getMediaView
abstract View getMediaView()
-
getOptionsView
abstract View getOptionsView()
-
getMediaContentAspectRatio
abstract Float getMediaContentAspectRatio()
-
getStarRating
abstract Double getStarRating()
-
getIsExpired
abstract Boolean getIsExpired()
-
getIsVideoContent
Boolean getIsVideoContent()
-
getVideoDuration
Double getVideoDuration()
-
-
-
-