useAdropInterstitialAd

interstitial hook responsible for requesting interstitial ads and displaying them to the user.


const { 
    isLoaded,
    isOpened,
    isClicked,
    isClosed,
    errorCode,
    load,
    show,
    reset
} = useAdropInterstitialAd(unitId: string)

Requires Ad unit ID


Returns

isLoaded: boolean

Determine if ad is fully loaded.

isOpened: boolean

Determine if ad is shown.

isClicked: boolean

Determine if ad is clicked.

isClosed: boolean

Determine if ad is dismissed.

errorCode: string?

AdropErrorCode when the adrop ad fails to receive, show.

load: () -> void

Requests an ad from Adrop using the ad unit ID.

show: () -> void

Shows an ad from Adrop using the ad unit ID. Must be fully loaded before show is called.

reset: () -> void

Reset to request new ad, or destroy the ad to free resources.

Last updated