GoogleMobileAds.
Api.
AppOpenAdPreloader
The preloader for app open ads.
Summary
Public static functions
Destroy
(string preloadId)
void
preloadId
and destroys all associated preloaded ads. DestroyAll
()
void
GetConfiguration
(string preloadId)
Dictionary< string, PreloadConfiguration
>
GetNumAdsAvailable
(string preloadId)
int
IsAdAvailable
(string preloadId)
bool
preloadId
. Preload
(string preloadId, PreloadConfiguration
preloadConfiguration, Action< string, ResponseInfo
> onAdPreloaded, Action< string, AdError
> onAdFailedToPreload, Action< string > onAdsExhausted)
bool
Public static functions
DequeueAd
AppOpenAd DequeueAd ( string preloadId )
Returns a preloaded ad and removes it from the cache.
preloadId
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.
preloadId
false
if there is no active preload configuration for the given preloadId
.DestroyAll
void DestroyAll ()
Stops preloading and destroys preloaded ads for all preload configurations.
GetConfiguration
PreloadConfiguration GetConfiguration ( string preloadId )
Get the AppOpen 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 AppOpen 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.
preloadId
IsAdAvailable
bool IsAdAvailable ( string preloadId )
Determines whether at least one ad is available for the given preloadId
.
preloadId
Preload
bool Preload ( string preloadId , PreloadConfiguration preloadConfiguration , Action < string , ResponseInfo > onAdPreloaded , Action < string , AdError > onAdFailedToPreload , Action < string > onAdsExhausted )
Starts preloading app open ads from the configuration for the given preload ID.
preloadId
|
A string that uniquely identifies the
PreloadConfiguration
. Use this identifier when calling DequeueAd
to retrieve a preloaded ad for this configuration. |
preloadConfiguration
|
The configuration that dictates how ads are preloaded.
|
onAdPreloaded
|
Called when a new ad is available for the given preload ID.
|
onAdFailedToPreload
|
Called when an ad failed to load for a given preload ID.
|
onAdsExhausted
|
Called when the last available ad is exhausted for the given preload ID.
|

