-
public final class ImageLoaderImageLoader is responsible for asynchronously loading and displaying image ads, including tracking impressions and handling click interactions.
-
-
Constructor Summary
Constructors Constructor Description ImageLoader(CoroutineScope coroutineScope, AdTracker adTracker)
-
Method Summary
Modifier and Type Method Description final UnitsetViewLoadListener(Function2<ImageAd, String, Unit> listener)Sets a listener to be notified when the ad view is fully loaded. final UnitclearViewLoadListener()Clear the view load listener to prevent memory leaks -
-
Constructor Detail
-
ImageLoader
ImageLoader(CoroutineScope coroutineScope, AdTracker adTracker)
- Parameters:
coroutineScope- The CoroutineScope in which image loading and tracking operations are executed.adTracker- A utility class responsible for tracking ad impressions and clicks.
-
-
Method Detail
-
setViewLoadListener
final Unit setViewLoadListener(Function2<ImageAd, String, Unit> listener)
Sets a listener to be notified when the ad view is fully loaded.
- Parameters:
listener- Callback receiving the loaded ImageAd and its tracking ID.
-
clearViewLoadListener
final Unit clearViewLoadListener()
Clear the view load listener to prevent memory leaks
-
-
-
-