Fullscreen (Interstitial)

Integrate fullscreen ads

Usage

All functions to create, reload and show fullscreen ads are included to RNAatkit module. So first you should import RNAatkit.

import {
    RNAatkit,
} from '@addapptr/react-native-aatkit'

When AATKit is already initialized, you can create fullscreen placement. Just call createPlacement function passing placement name and the size as RNAatkit.PlacementSize_Fullscreen. Please note that the placement name has to be constant after once defined and cannot change with every app restart.

RNAatkit.createPlacement("Fullscreen", RNAatkit.PlacementSize_Fullscreen);

Then you can reload placement using reloadPlacement function. Also it's possible to let fullscreen ad be auto-reloaded by calling startPlacementAutoReload.

RNAatkit.reloadPlacement(
    "Fullscreen", (placementReloaded) => {
        console.log("placementReloaded " + placementReloaded);
    });

When fullscreen ad is loaded, you can show it calling showPlacement function.

RNAatkit.showPlacement("Fullscreen", (interstitialShown) => {
    console.log("interstitialShown " + interstitialShown);
});

Callbacks

RNAatkit provides callbacks which might be useful, for example to get notified when fullscreen ad is loaded. To receive them, use NativeEventEmitter.

API

For more details about functions and callbacks of RNAatkit component, please see this page in the Reference.

Last updated