인터스티셜 광고 형태 소개
- 화면 전체를 덮는 형태로 노출되는 광고입니다.
- 이미지/동영상 모두 포함되나 동영상 소재가 더 많이 노출되며 일반적으로 5초 후부터 스킵이 가능합니다.

동작 예시

구현하기
인터스티셜 광고는 Hook API로 사용합니다. 컴포넌트 내부에서useInterstitialAd를 사용하면 로딩 상태와 이벤트 콜백을 함께 관리할 수 있습니다.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.


useInterstitialAd를 사용하면 로딩 상태와 이벤트 콜백을 함께 관리할 수 있습니다.
InterstitialAd.loadAd 등)는 deprecated입니다. 정적 리스너(InterstitialAd.addAdLoadedEventListener 등)는 Hook이나 인스턴스 API로 로드한 광고의 이벤트를 받지 못하니, 광고 로드를 새 API로 옮길 때 이벤트 리스너도 함께 옮겨주세요.import { Button } from "react-native";
import { useInterstitialAd } from "react-native-daro";
function InterstitialAdButton({ adUnitId }) {
const { isLoaded, isLoading, load, show, isAdReady } = useInterstitialAd(
adUnitId,
{
onLoaded: (adInfo) => {
// 광고 로드 성공
},
onLoadFailed: (errorInfo) => {
// 광고 로드 실패
},
onDisplayed: (adInfo) => {
// 광고 노출
},
onHidden: (adInfo) => {
// 광고 닫힘
},
onImpressionRecorded: (adInfo) => {
// 광고 impression 기록
},
}
);
const handlePress = async () => {
if (await isAdReady()) {
show();
return;
}
load();
};
return (
<Button
disabled={isLoading}
title={isLoaded ? "Show Interstitial" : "Load Interstitial"}
onPress={handlePress}
/>
);
}
