-
- All Implemented Interfaces:
-
io.cloudx.sdk.CloudXDestroyable
public interface CloudXFullscreenAd<T extends CloudXFullscreenAdListener> implements CloudXDestroyable
Fullscreen ad interface for interstitial and rewarded ads.
-
-
Method Summary
Modifier and Type Method Description abstract Unitload()Loads ad; if ad is loaded, CloudXFullscreenAdListener.onAdLoaded will be invoked; CloudXFullscreenAdListener.onAdLoadFailed otherwise. abstract Unitshow(Activity activity, String placement, String customData)Shows ad over the provided Activity. Unitshow(Activity activity)Convenience overload for Java callers. Unitshow(Activity activity, String placement)Convenience overload for Java callers. abstract UnitsetExtraParameter(String key, Object value)Sets or clears an extra parameter attached to future bid requests for this ad. abstract TgetListener()Listener for ad lifecycle events. abstract UnitsetListener(T listener)Listener for ad lifecycle events. abstract CloudXAdRevenueListenergetRevenueListener()Listener for impression-level revenue events. abstract UnitsetRevenueListener(CloudXAdRevenueListener revenueListener)Listener for impression-level revenue events. abstract BooleangetIsAdReady()Returns whether an ad is loaded and ready to be shown. -
-
Method Detail
-
load
abstract Unit load()
Loads ad; if ad is loaded, CloudXFullscreenAdListener.onAdLoaded will be invoked; CloudXFullscreenAdListener.onAdLoadFailed otherwise.
-
show
abstract Unit show(Activity activity, String placement, String customData)
Shows ad over the provided Activity.
If show is successful CloudXFullscreenAdListener.onAdDisplayed will be invoked; CloudXFullscreenAdListener.onAdDisplayFailed otherwise. Ad fail can happen when ad is not loaded yet or due to internal ad display error.
- Parameters:
activity- The Activity over which to show the fullscreen ad.placement- Optional placement identifier for tracking.customData- Optional custom data for tracking (e.g.
-
setExtraParameter
abstract Unit setExtraParameter(String key, Object value)
Sets or clears an extra parameter attached to future bid requests for this ad.
Supported value types: String, Number, Boolean, Map, Iterable, Array, and Kotlin primitive arrays. Pass
nullto remove the key. Invalid values are ignored and logged — they never fail ad loading.Reserved floor keys:
"minFloor"— single-round publisher floor in USD CPM. Accepts a Number or decimal String."minFloors"— per-round floor overrides. Accepts a List / Array of numbers or decimal strings, or a JSON-array string.
Values are captured at call time. If you pass a Map or List and later mutate it, earlier bid requests are unaffected — call
setExtraParameteragain to push updates.Mixed-validity containers: a Map keeps its valid entries and drops the invalid ones; a List / Array is all-or-nothing — any invalid element discards the entire collection, to preserve positional ordering for keys like
"minFloors".Timing: fullscreen ads use the values current at the time of load; changes after that take effect on the next load call.
- Parameters:
key- Parameter key.value- Value to store, ornullto remove the key.
-
getListener
abstract T getListener()
Listener for ad lifecycle events.
-
setListener
abstract Unit setListener(T listener)
Listener for ad lifecycle events.
-
getRevenueListener
abstract CloudXAdRevenueListener getRevenueListener()
Listener for impression-level revenue events.
-
setRevenueListener
abstract Unit setRevenueListener(CloudXAdRevenueListener revenueListener)
Listener for impression-level revenue events.
-
getIsAdReady
abstract Boolean getIsAdReady()
Returns whether an ad is loaded and ready to be shown.
-
-
-
-