Ad Context
class AdContext(context: Context, activity: Activity, val uiTheme: UiTheme.Theme, val isForStories: Boolean, isMuted: Boolean, val showMuteButton: Boolean = false, val clipsActionButtonFullWidth: Boolean = false, val isEmbeddedClips: Boolean = false, val isBottomBanner: Boolean = false)
Provides contextual information required when rendering ads.
The supplied activity reference is automatically wrapped in a java.lang.ref.WeakReference so that the SDK does not prevent the hosting Activity from being garbage-collected. Always check that activity is non-null before attempting to use it.
An AdContext is created once per player session (story player open / clip screen) and shared across every ad request issued during that session. Per-request state (slot identifier, playhead signal, fill attribution, cancellation) lives on AdSlot obtained via allocateSlot.
Constructors
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Returns the slot previously allocated under designatedId or null if none exists.