Full-screen ads that cover the interface of an app until closed by the user. They’re best used at natural pauses in the flow of an app’s execution, such as in between levels of a game or just after completing a task.
Show the Ad
Call createInterstitial
method from RefineryAdFactory
to display interstitial ads by providing the configurationId
.
R89SDK.adFactory.createInterstitial( configurationId: ConfigBuilder.interstitialTestR89ConfigId);
Lifecycle Events
To receive lifecycle events, provide InterstitialEventListener
to R89SDK.adFactory.createInterstitial
via lifecycleCallbacks
parameter. Details about InterstitialEventListener
can be found in the Reference.
R89SDK.adFactory.createInterstitial( configurationId: ConfigBuilder.interstitialTestR89ConfigId, lifecycleCallbacks: InterstitialEventListener.callbacks( onLoadedCallback: () {}, onOpenCallback: () {}, onImpressionCallback: () {}, onClickCallback: () {}, onFailedToLoadCallback: (error) {}, onAdFailedToShowFullScreenCallback: (error) {}));
To receive an interstitial close event, provide the afterInterstitial
callback to R89SDK.adFactory.createInterstitial
method.
R89SDK.adFactory.createInterstitial( configurationId: ConfigBuilder.interstitialTestR89ConfigId, lifecycleCallbacks: InterstitialEventListener.callbacks( onLoadedCallback: () {}, ... onAdFailedToShowFullScreenCallback: (error) {}), afterInterstitial: () { // Close event }, );
El afterInterstitial
callback is not passed as a separate object like the other Events because it is mandatory to handle what happens after an Interstitial is closed.
The following is invoked in the SDK when:
- The user just closed the full-screen ad.
- The ad failed to show.