NativeAdData

interface NativeAdData

Properties

Link copied to clipboard
abstract val adInfo: AdInfo?

Returns additional information like price and currency of the ad.

Link copied to clipboard
abstract val advertiser: String?

Returns the advertiser asset of native ad (not the same as ad network providing it).

Link copied to clipboard
abstract val brandingLogo: View?

Returns the view with branding logo or ad information related to the ad network providing the native ad. Some networks like Facebook Audience Network require this special view to be visible on native ads.

Link copied to clipboard
abstract val callToAction: String?

Returns the call to action of native ad.

Link copied to clipboard
abstract val description: String?

Returns the description of native ad.

Link copied to clipboard
abstract val iconUrl: String?

Returns the URL of the icon asset of native ad.

Link copied to clipboard
abstract val imageUrl: String?

Returns the URL of the image asset of native ad.

Link copied to clipboard
abstract val isExpired: Boolean

Returns if the native ad has expired and shall no longer be used.

Link copied to clipboard
abstract val isReady: Boolean

Returns if the native ad is ready to be displayed.

Link copied to clipboard
abstract val network: AdNetwork

Returns the ad network providing given native ad

Link copied to clipboard
abstract val rating: NativeAd.NativeAdRating?

Returns the rating asset of native ad.

Link copied to clipboard
abstract val title: String?

Returns the title of native ad.

Functions

Link copied to clipboard
abstract fun attachToLayout(layout: ViewGroup, mainImageView: View?, iconView: View?, ctaView: View?)

Binds the native ad instance with given ViewGroup. Needed for click handling and tracking.

Link copied to clipboard
abstract fun detachFromLayout()

Removes the binding between native ad and ViewGroup. Should be called when the native ad will no longer be presented and should be destroyed.