跳转到内容

插屏广告

插屏广告一般采用全屏或整页形式,会暂时覆盖应用的整个界面,通常出现在应用自然的暂停或过渡节点,例如游戏关卡完成后、主要视图切换时等。

以下各节将向您介绍如何加载和显示插屏广告。

加载插屏广告

以下代码展示了如何绑定委托以及加载第一则插屏广告:

Initialize Interstitial Ads. Custom Event. Interstitial ad is ready to be shown. “Is Interstitial Ready” will return true. On Interstitial Ad Loaded Dynamic Delegate (AppLovinMAXDelegate): Ad Info. Reset retry attempts. SET. Retry Attempt: 0.0. On Interstitial Ad Load Failed Dynamic Delegate (AppLovinMAXDelegate): Ad Info, Ad Error. Retry Attempt. ++. MIN: 6.0, Add pin +. Power: Base 2.0, Exp, Return Value. Delay: Duration, Completed. If interstitial ad fails to load, retry with exponentially higher delays up to a maximum delay (in this case 64 seconds). Interstitial ad failed to display. AppLovin recommends loading the next ad. On Interstitial Ad Display Failed Dynamic Delegate (AppLovinMAXDelegate): Ad Info, Ad Error. Interstitial ad is hidden. Pre-load the next ad. On Interstitial Ad Hidden Dynamic Delegate (AppLovinMAXDelegate): Ad Info. Ad Unit Identifier. Load Interstitial: Ad Unit Identifier.

显示插屏广告

调用 ShowInterstitial() 以显示插屏广告:

Ad Unit Identifier. Is Interstitial Ready: Ad Unit Identifier, Return Value. Branch: Condition, True/False. Show Interstitial: Ad Unit Identifier, Placement.