Protected_Whether the advert is loaded and can be shown.
Snapshot of the loaded ad's response info, or null before load / after destroy.
ProtectedconstructorProtected_Protected_Protected_Protected_Listen to ad events. See AdEventTypes for more information.
Returns an unsubscriber function to stop listening to further events.
// Create InterstitialAd/RewardedAd
const advert = InterstitialAd.createForAdRequest('...');
const unsubscribe = advert.addAdEventListener(AdEventType.LOADED, () => {
});
// Sometime later...
unsubscribe();
The event type, e.g. AdEventType.LOADED.
A listener callback containing a event type, error and data.
Listen to ad events. See AdEventTypes for more information.
Returns an unsubscriber function to stop listening to further events.
// Create InterstitialAd/RewardedAd
const advert = InterstitialAd.createForAdRequest('...');
const unsubscribe = advert.addAdEventsListener(({ type, payload }) => {
});
// Sometime later...
unsubscribe();
A listener callback containing a event type, error and data.
Release native resources for this ad instance. Idempotent; safe to call from React effect cleanup.
Start loading the advert with the provided RequestOptions.
It is recommended you setup ad event handlers before calling this method.
Remove all registered event listeners.
Show the loaded advert to the user.
Uses two error channels:
.catch() (or try { await } catch).showOptions are structurally invalid (checked only on a
loaded ad with no show in flight, so otherwise the rejection comes
first). Fix the call site.The fullscreen hooks' show absorbs both channels.
// Create InterstitialAd/RewardedAd
const advert = InterstitialAd.createForAdRequest('...');
advert.addAdEventListener(AdEventType.LOADED, () => {
advert
.show({
immersiveModeEnabled: true,
})
.catch(console.warn);
});
OptionalshowOptions: AdShowOptions
An optional AdShowOptions interface.
StaticcreateOptionalrequestOptions: RequestOptionsProtected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_
The Ad Unit ID for this Gogole Mobile Ads ad.