Class LoadingStateHelperKt
-
- All Implemented Interfaces:
public final class LoadingStateHelperKt
-
-
Method Summary
Modifier and Type Method Description final static AdSessionManagercreateOMSDKSession(NativeAdUnitComponent $self)Creates an OM-SDK AdSession based on the media type of the native ad. final static AdChoiceViewManagercreateAdChoiceManager(AdComponent adComponent, Image adChoice)Creates an ad choice view manager for handling ad choice display and interaction. -
-
Method Detail
-
createOMSDKSession
final static AdSessionManager createOMSDKSession(NativeAdUnitComponent $self)
Creates an OM-SDK AdSession based on the media type of the native ad.
This function determines the appropriate OM-SDK session manager based on whether the native ad contains video content or not. Video ads use NativeVideoAdSessionManager while non-video ads use NativeAdSessionManager.
The function uses the parent coroutine scope because the OM-SDK session object lives beyond the lifecycle of NativeLoadingState and needs to persist throughout the ad's display lifecycle.
- Returns:
An appropriate AdSessionManager instance for the native ad type.
-
createAdChoiceManager
final static AdChoiceViewManager createAdChoiceManager(AdComponent adComponent, Image adChoice)
Creates an ad choice view manager for handling ad choice display and interaction.
This function creates a manager responsible for displaying the ad choice icon and handling user interactions with it. The ad choice provides users with information about why they're seeing the ad and options to control ad preferences.
- Parameters:
adComponent- The AdComponent providing core ad functionality and context.adChoice- The Image configuration for the ad choice icon, or null if not available.- Returns:
A configured AdChoiceViewManager instance.
-
-
-
-