GoogleMobileAds. Api. RewardedAdPreloader
The preloader for rewarded ads.
Summary
Public static functions |
|
---|---|
DequeueAd(string preloadId)
|
Returns a preloaded ad and removes it from the cache.
|
Destroy(string preloadId)
|
void
Stops preloading for the given
preloadId and destroys all associated preloaded ads. |
DestroyAll()
|
void
Stops preloading and destroys preloaded ads for all preload configurations.
|
GetConfiguration(string preloadId)
|
Get the rewarded ad PreloadConfiguration associated with the given preload ID, or null if one does not exist.
|
GetConfigurations()
|
Dictionary< string, PreloadConfiguration >
Get a dictionary of all rewarded ad PreloadConfigurations, keyed by their associated preload ID, or an empty dictionary if no preloaders exist.
|
GetNumAdsAvailable(string preloadId)
|
int
Get the number of ads available for the given preload ID.
|
IsAdAvailable(string preloadId)
|
bool
Determines whether at least one ad is available for the given
preloadId . |
Preload(string preloadId, PreloadConfiguration preloadConfiguration, Action< string, ResponseInfo > onAdPreloaded, Action< string, AdError > onAdFailedToPreload, Action< string > onAdsExhausted)
|
bool
Starts preloading rewarded ads from the configuration for the given preload ID.
|
Public static functions
DequeueAd
RewardedAd DequeueAd( string preloadId )
Returns a preloaded ad and removes it from the cache.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The preloaded ad for the given preload ID, or null if no ad is available.
|
The ad returned may be any of the ads preloaded for preloadId
. The order returned is not guaranteed to match the order of OnAdAvailable
events.
Destroy
void Destroy( string preloadId )
Stops preloading for the given preloadId
and destroys all associated preloaded ads.
Details | |||
---|---|---|---|
Parameters |
|
DestroyAll
void DestroyAll()
Stops preloading and destroys preloaded ads for all preload configurations.
GetConfiguration
PreloadConfiguration GetConfiguration( string preloadId )
Get the rewarded ad PreloadConfiguration associated with the given preload ID, or null if one does not exist.
GetConfigurations
Dictionary< string, PreloadConfiguration > GetConfigurations()
Get a dictionary of all rewarded ad PreloadConfigurations, keyed by their associated preload ID, or an empty dictionary if no preloaders exist.
GetNumAdsAvailable
int GetNumAdsAvailable( string preloadId )
Get the number of ads available for the given preload ID.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The number of ads available for the given preload ID.
|
IsAdAvailable
bool IsAdAvailable( string preloadId )
Determines whether at least one ad is available for the given preloadId
.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
True if there is an ad available for the given preload ID.
|
Preload
bool Preload( string preloadId, PreloadConfiguration preloadConfiguration, Action< string, ResponseInfo > onAdPreloaded, Action< string, AdError > onAdFailedToPreload, Action< string > onAdsExhausted )
Starts preloading rewarded ads from the configuration for the given preload ID.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||
Returns |
False if preloading fails to start.
|