showFullScreenAd
Feature description
loadFullScreenAdShow the preloaded integrated full-screen ad to the user. loadFullScreenAdthe same as used in adGroupIdYou must pass it. Since an ad that has already been displayed cannot be displayed again, you need to load a new one after the ad is closed.
Toss app 5.227.0 Can be used on versions above (5.239.0 For versions above, Toss Ad + AdMob integration; for versions below, AdMob only). Before calling showFullScreenAd.isSupported()You can check whether it is supported with
Type
showFullScreenAd(params: ShowFullScreenAdParams): () => void;Params
type ShowFullScreenAdParams = {
options: ShowFullScreenAdOptions;
onEvent: (event: ShowFullScreenAdEvent) => void;
onError: (error: unknown) => void;
};
type ShowFullScreenAdOptions = {
/** The ad group ID is the same as the one used in loadFullScreenAd. */
adGroupId: string;
};
type ShowFullScreenAdEvent =
| { type: "requested" }
| { type: "show" }
| { type: "impression" }
| { type: "clicked" }
| { type: "dismissed" }
| { type: "failedToShow" }
| {
type: "userEarnedReward";
data: { unitType: string; unitAmount: number };
};Event type Value:
requested
The request to show the ad succeeded
show
The ad was displayed on screen
impression
The ad impression was recorded (the point at which revenue is generated)
clicked
The user clicked the ad
dismissed
The user closed the ad
failedToShow
Failed to show the ad
userEarnedReward
The user earned a reward (reward ads only)
Response
Function to unregister the AppBridge callback (() => void).
Error
If showing the ad fails failedToShow event or onError It is delivered via callback. Reward ads userEarnedReward should only award a reward when the event occurs.
Example code
Was this helpful?