-
public final class CarouselLoaderProject Name: OSMOS-Android-SDK File Name: CarouselLoader
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classCarouselLoader.LayoutResultpublic final classCarouselLoader.CarouselAdapterpublic final classCarouselLoader.MultiAdAdapter
-
Constructor Summary
Constructors Constructor Description CarouselLoader(CoroutineScope coroutineScope, AdTrackerInterface adTracker)
-
Method Summary
Modifier and Type Method Description final UnitsetErrorCallback(ErrorCallback callback)Set an error callback to handle errors that occur during carousel ad loading or playback. final UnitclearErrorCallback()Clear the error callback to prevent memory leaks. final ViewrenderCarouselView(Context context, Integer width, Integer height, Integer elementWidth, Integer elementHeight, String adLabelText, Integer adLabelAlignment, String cliUbid, List<CarouselAdElement> adList, CarouselAd carouselAd, Function3<Map<String, Object>, Map<String, Object>, String, Unit> adClickedListener, Function1<Map<String, Object>, Unit> onViewLoadListener)final ViewrenderMultiAdCarouselView(Context context, Integer width, Integer height, List<MultiAd> multiAd, Integer elementWidth, Integer elementHeight, String adLabelText, Integer adLabelAlignment, Function1<Map<String, Object>, Unit> adClickListener, Function2<Map<String, Object>, String, Unit> onViewLoadListener)final UnitreleaseAllPlayers()final Unitcleanup()Comprehensive cleanup method that releases all resources and clears all callbacks. -
-
Constructor Detail
-
CarouselLoader
CarouselLoader(CoroutineScope coroutineScope, AdTrackerInterface adTracker)
-
-
Method Detail
-
setErrorCallback
final Unit setErrorCallback(ErrorCallback callback)
Set an error callback to handle errors that occur during carousel ad loading or playback.
- Parameters:
callback- Callback that handles error scenarios with structured error information.
-
clearErrorCallback
final Unit clearErrorCallback()
Clear the error callback to prevent memory leaks. Note: Only clears ImageLoader callback since VideoLoader callback is already cleared by releaseAllPlayers() -> safeReleaseAllPlayers().
-
renderCarouselView
final View renderCarouselView(Context context, Integer width, Integer height, Integer elementWidth, Integer elementHeight, String adLabelText, Integer adLabelAlignment, String cliUbid, List<CarouselAdElement> adList, CarouselAd carouselAd, Function3<Map<String, Object>, Map<String, Object>, String, Unit> adClickedListener, Function1<Map<String, Object>, Unit> onViewLoadListener)
-
renderMultiAdCarouselView
final View renderMultiAdCarouselView(Context context, Integer width, Integer height, List<MultiAd> multiAd, Integer elementWidth, Integer elementHeight, String adLabelText, Integer adLabelAlignment, Function1<Map<String, Object>, Unit> adClickListener, Function2<Map<String, Object>, String, Unit> onViewLoadListener)
-
releaseAllPlayers
final Unit releaseAllPlayers()
-
-
-
-