Package ru.buzzoola.ads.instream
Class InstreamAdLoader
-
- All Implemented Interfaces:
public final class InstreamAdLoaderA loader class responsible for loading in-stream ads.
Use load to start loading an ad, setTimeout to configure the maximum wait time, and destroy to clean up resources when the loader is no longer needed.
-
-
Constructor Summary
Constructors Constructor Description InstreamAdLoader(InstreamAdLoadListener loadListener)
-
Method Summary
Modifier and Type Method Description final Unitload(AdRequest adRequest)Starts loading an in-stream ad with the specified AdRequest. final UnitsetTimeout(@IntRange(from = 2, to = 30) Integer timeout)Sets a timeout for the ad loading process. final Unitdestroy()Releases resources and cancels any ongoing ad load requests. -
-
Constructor Detail
-
InstreamAdLoader
InstreamAdLoader(InstreamAdLoadListener loadListener)
- Parameters:
loadListener- Listener that will receive callbacks about the ad loading state.
-
-
Method Detail
-
load
final Unit load(AdRequest adRequest)
Starts loading an in-stream ad with the specified AdRequest.
- Parameters:
adRequest- The set of parameters used to load the ad.
-
setTimeout
final Unit setTimeout(@IntRange(from = 2, to = 30) Integer timeout)
Sets a timeout for the ad loading process. If the ad does not load within the given time, InstreamAdLoadListener.onAdFailedToLoad callback will be triggered.
Default timeout is 10 seconds.
- Parameters:
timeout- Timeout in seconds.
-
-
-
-