Ad Context
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
Cancellation signal completed by the SDK when the entire player session is dismissed.
Video sizing behavior used by native video ads rendered inside Embedded Clips.
Indicates this ad context is for a bottom banner ad in clips.
Functions
Returns the slot previously allocated under designatedId or null if none exists.