SASNativeAdView

Top level native ad view component that will act as a container of the underlying native-ad layout.

Constructors

Link copied to clipboard
constructor(context: Context)
constructor(context: Context, attributeSet: AttributeSet?)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Interface for listener objects that are notified of ad call outcomes.

Properties

Link copied to clipboard

The #SASAdPlacement on which the latest ad was successfully loaded, if any.

Link copied to clipboard

The currently installed #NativeAdListener on this #SASNativeAdView instance.

Functions

Link copied to clipboard
fun loadAd(adPlacement: SASAdPlacement)

Loads an ad for the specified placement

Link copied to clipboard
fun onDestroy()

This method must be called when the activity (that this view is attached to) is destroyed (typically in the onDestroy() method of the activity).

Link copied to clipboard
fun trackMediationView(mediationView: View)

Tracks the specified mediation view instead of this SASNativeAdView instance. Useful for mediation scenarios where the primary SDK is in charge of rendering the SASNativeAdAssets, disregarding the rendered SASNativeAdView, where its own rendered view must be tracked for impression (when added to UI hierarchy), viewability, and clicks.