OptionalerrorJavaScript Error containing the error code and message thrown by the Ad.
Whether the user clicked the advert.
Whether the user closed the ad and has returned back to your application.
OptionalisWhether the user earned the reward by Rewarded Ad.
Whether the ad is loaded and ready to to be shown to the user.
Whether the ad is opened.
Whether your ad is showing.
The value is equal with isOpened && !isClosed.
Snapshot of the loaded ad's response info, or null before load / after destroy.
OptionalrevenuePayload from the last impression-level ad revenue event.
OptionalrewardLoaded reward item of the Rewarded Ad.
Show the loaded advert to the user.
export default function App() {
const interstitial = useInterstitialAd(TestIds.INTERSTITIAL, {
requestNonPersonalizedAdsOnly: true,
});
return (
<View>
<Button
title="Navigate to next screen"
onPress={() => {
if (interstitial.isLoaded) {
interstitial.show();
} else {
navigation.navigate('NextScreen');
}
}}
/>
</View>
)
}
OptionalshowOptions: AdShowOptions
An optional AdShowOptions interface.
Release native resources for the underlying ad instance.