Flutter - Monetizza SDK Documentazione App

⌘K
  1. Flutter – Monetizza...
  2. Formati Pubblicitari
  3. Interstiziale

Interstiziale

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);

Eventi del Ciclo di Vita

To receive lifecycle events, provide InterstitialEventListener a R89SDK.adFactory.createInterstitial tramite callback del ciclo di vita dettagli sul parametro. InterstitialEventListener può essere trovato nel Riferimento.

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
  },
);

Il 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.

Come possiamo aiutarti?