public class BidManager extends java.lang.Object implements ApplicationStoppedListener
| Modifier and Type | Method and Description |
|---|---|
Slot |
getBidForAdUnitAndPrefetch(AdUnit adUnit)
Returns the last fetched bid a fetch a new one for the next invocation.
|
void |
onApplicationStopped() |
void |
prefetch(java.util.List<AdUnit> adUnits)
This method is called back after the "useragent" is fetched
|
@Nullable public Slot getBidForAdUnitAndPrefetch(@Nullable AdUnit adUnit)
A null value could be returned. This means that there is no valid bid for the
given AdUnit. And caller should not try to display anything.
null may be returned in case of
Config.isKillSwitchEnabled()AdUnit is not valid. See AdUnitMapper for validity definition
Asynchronously, a new bid is fetch to CDB to get a new proposition. Hence if this method
returns a bid, it is consumed, and you have to wait for the new proposition to get a result
again. Meanwhile, you'll only get a null value.
There may be some case when a new bid is not fetch:
adUnit - Declaration of ad unit to get a bid fromnull that should be ignoredpublic void onApplicationStopped()
onApplicationStopped in interface ApplicationStoppedListenerpublic void prefetch(@NonNull
java.util.List<AdUnit> adUnits)
adUnits - list of ad units to prefetch