전면 광고
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
전면 광고는 호스트 앱의 인터페이스를 완전히 덮는 전체 화면 광고입니다. 일반적으로 활동이 바뀌는 시점 또는 게임에서 다음 레벨로 넘어갈 때처럼 앱 흐름의 자연스러운 전환 시점에 광고가 게재됩니다. 앱에
전면 광고가 표시되면 사용자는 광고를 탭하여 도착 페이지로 이동하거나
광고를 닫고 앱으로 돌아갈 수 있습니다.
이 가이드에서는 전면 광고를 Flutter 앱에 통합하는 방법을 설명합니다.
항상 테스트 광고로 테스트
앱을 제작하고 테스트할 때는 운영 중인 실제 광고 대신 테스트 광고를 사용하세요. 이렇게 하지 않으면 계정이 정지될 수 있습니다.
테스트 광고를 로드하는 가장 쉬운 방법은 전면 광고의 테스트 전용 광고 단위 ID를 사용하는 것입니다.
Android
ca-app-pub-3940256099942544/1033173712
iOS
ca-app-pub-3940256099942544/4411468910
테스트 광고 단위는 모든 요청에 대해 테스트 광고를 반환하도록 구성되며 코딩, 테스트, 디버깅 중에 앱에서 자유롭게 사용할 수 있습니다.
단, 앱을 게시하기 전에 이 테스트 광고 단위 ID를 자체 광고 단위 ID로 바꿔야
합니다.
광고 로드
다음 예에서는 전면 광고를 인스턴스화합니다.
_adUnitId를 자체 광고 단위 ID로 바꿉니다.
전면 광고 이벤트
FullScreenContentCallback
을 사용하면 광고 게재, 광고 닫기와 같은 수명 주기 이벤트를 수신 대기할 수 있습니다. 이러한 이벤트에 대한 알림을 받으려면 광고를 게재하기 전에 InterstitialAd.fullScreenContentCallback
을 설정하세요. 이 예에서는 각 메서드를 구현합니다.
ad.fullScreenContentCallback = FullScreenContentCallback(
onAdShowedFullScreenContent: (ad) {
// Called when the ad showed the full screen content.
debugPrint('Ad showed full screen content.');
},
onAdFailedToShowFullScreenContent: (ad, err) {
// Called when the ad failed to show full screen content.
debugPrint('Ad failed to show full screen content with error: $err');
// Dispose the ad here to free resources.
ad.dispose();
},
onAdDismissedFullScreenContent: (ad) {
// Called when the ad dismissed full screen content.
debugPrint('Ad was dismissed.');
// Dispose the ad here to free resources.
ad.dispose();
},
onAdImpression: (ad) {
// Called when an impression occurs on the ad.
debugPrint('Ad recorded an impression.');
},
onAdClicked: (ad) {
// Called when a click is recorded for an ad.
debugPrint('Ad was clicked.');
},
);
전면 광고 게재
InterstitialAd
는 모든 앱 콘텐츠 위에 Overlay
로 표시되며 정적으로 배치되므로 Flutter 위젯 트리에 추가할 수 없습니다. show()
를 호출하여 광고 게재 시점을 선택할 수 있습니다.
_interstitialAd?.show();
show()
가 호출되면
이 방식으로 게재된 Ad
는 프로그래매틱 방식으로 닫을 수 없으며 사용자가
입력해야 닫을 수 있습니다. InterstitialAd
는 한 번만 게재할 수 있습니다. 이후 표시되는 호출에서 onAdFailedToShowFullScreenContent
를 트리거합니다.
광고에 대한 액세스가 더 이상 필요하지 않으면 광고를 삭제해야 합니다. dispose()
를 호출하기 가장 좋은 시점은 FullScreenContentCallback.onAdDismissedFullScreenContent
및 FullScreenContentCallback.onAdFailedToShowFullScreenContent
콜백이 실행될 때입니다.
이렇게 하면 이제 앱에서 전면 광고를 표시할 수 있습니다.
다음 단계
GitHub의 전체 예
전면 광고
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-22(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-22(UTC)"],[[["\u003cp\u003eInterstitial ads are full-screen ads displayed at natural transition points in an app, giving users the choice to interact or close them.\u003c/p\u003e\n"],["\u003cp\u003eThis guide provides instructions on integrating interstitial ads into Flutter apps using the google_mobile_ads package.\u003c/p\u003e\n"],["\u003cp\u003eAlways test with dedicated test ad unit IDs provided to avoid account suspension before publishing your app with your own ad unit IDs.\u003c/p\u003e\n"],["\u003cp\u003eUtilize \u003ccode\u003eFullScreenContentCallback\u003c/code\u003e to manage ad lifecycle events like display, dismissal, and errors and to properly dispose of the ad.\u003c/p\u003e\n"],["\u003cp\u003eDisplay the loaded interstitial ad by calling \u003ccode\u003eshow()\u003c/code\u003e, keeping in mind that it can only be shown once and dismissed by user interaction.\u003c/p\u003e\n"]]],["Interstitial ads are full-screen ads shown at natural app transitions. To integrate them into a Flutter app, use test ad unit IDs (Android: `ca-app-pub-3940256099942544/1033173712`, iOS: `ca-app-pub-3940256099942544/4411468910`) during development. Load an ad using `InterstitialAd.load`, handling success or failure. Utilize `FullScreenContentCallback` to manage ad lifecycle events like showing or dismissal. Display the ad with `show()`, noting it's a one-time action. Finally, dispose of the ad in `onAdDismissedFullScreenContent` and `onAdFailedToShowFullScreenContent`.\n"],null,["Select platform: [Android](/admob/android/interstitial \"View this page for the Android platform docs.\") [iOS](/admob/ios/interstitial \"View this page for the iOS platform docs.\") [Unity](/admob/unity/interstitial \"View this page for the Unity platform docs.\") [Flutter](/admob/flutter/interstitial \"View this page for the Flutter platform docs.\")\n\n\u003cbr /\u003e\n\nInterstitial ads are full-screen ads that cover the interface of their host app.\nThey're typically displayed at natural transition points in the flow of an app,\nsuch as between activities or during the pause between levels in a game. When an\napp shows an interstitial ad, the user has the choice to either tap on the ad\nand continue to its destination or close it and return to the app.\n\nThis guide explains how to integrate interstitial ads into a Flutter app.\n\nAlways test with test ads\n\nWhen building and testing your apps, make sure you use test ads rather than\nlive, production ads. Failure to do so can lead to suspension of your account.\n\nThe easiest way to load test ads is to use our dedicated test ad unit ID for\ninterstitials: \n\nAndroid \n\n ca-app-pub-3940256099942544/1033173712\n\niOS \n\n ca-app-pub-3940256099942544/4411468910\n\nThe test ad units are configured to return test ads for every request, and\nyou're free to use them in your own apps while coding, testing, and debugging.\nJust make sure you replace them with your own ad unit IDs before publishing your\napp.\n\nLoad an ad\n\nThe following example loads an interstitial ad: \n\n```gdscript\nclass InterstitialExampleState extends State\u003cInterstitialExample\u003e {\n InterstitialAd? _interstitialAd;\n\n // TODO: replace this test ad unit with your own ad unit.\n final adUnitId = Platform.isAndroid\n ? 'ca-app-pub-3940256099942544/1033173712'\n : 'ca-app-pub-3940256099942544/4411468910';\n\n /// Loads an interstitial ad.\n void loadAd() {\n InterstitialAd.load(\n adUnitId: adUnitId,\n request: const AdRequest(),\n adLoadCallback: InterstitialAdLoadCallback(\n // Called when an ad is successfully received.\n onAdLoaded: (ad) {\n debugPrint('$ad loaded.');\n // Keep a reference to the ad so you can show it later.\n _interstitialAd = ad;\n },\n // Called when an ad request failed.\n onAdFailedToLoad: (LoadAdError error) {\n debugPrint('InterstitialAd failed to load: $error');\n },\n ));\n }\n}\n```\n\nInterstitial ad events\n\nThrough the use of `FullScreenContentCallback`, you can listen for lifecycle\nevents, such as when the ad is shown or dismissed. Set\n`InterstitialAd.fullScreenContentCallback` before showing the ad to receive\nnotifications for these events. This example implements each method: \n\n```gdscript\nclass InterstitialExampleState extends State\u003cInterstitialExample\u003e {\n InterstitialAd? _interstitialAd;\n\n // TODO: replace this test ad unit with your own ad unit.\n final adUnitId = Platform.isAndroid\n ? 'ca-app-pub-3940256099942544/1033173712'\n : 'ca-app-pub-3940256099942544/4411468910';\n\n /// Loads an interstitial ad.\n void loadAd() {\n InterstitialAd.load(\n adUnitId: adUnitId,\n request: const AdRequest(),\n adLoadCallback: InterstitialAdLoadCallback(\n // Called when an ad is successfully received.\n onAdLoaded: (ad) {\n ad.fullScreenContentCallback = FullScreenContentCallback(\n // Called when the ad showed the full screen content.\n onAdShowedFullScreenContent: (ad) {},\n // Called when an impression occurs on the ad.\n onAdImpression: (ad) {},\n // Called when the ad failed to show full screen content.\n onAdFailedToShowFullScreenContent: (ad, err) {\n // Dispose the ad here to free resources.\n ad.dispose();\n },\n // Called when the ad dismissed full screen content.\n onAdDismissedFullScreenContent: (ad) {\n // Dispose the ad here to free resources.\n ad.dispose();\n },\n // Called when a click is recorded for an ad.\n onAdClicked: (ad) {});\n\n debugPrint('$ad loaded.');\n // Keep a reference to the ad so you can show it later.\n _interstitialAd = ad;\n },\n // Called when an ad request failed.\n onAdFailedToLoad: (LoadAdError error) {\n debugPrint('InterstitialAd failed to load: $error');\n },\n ));\n }\n}\n```\n\nDisplay an interstitial ad\n\nAn `InterstitialAd` is displayed as an [`Overlay`](//api.flutter.dev/flutter/widgets/Overlay-class.html)\non top of all app content and is statically placed; thus, it can't be added to\nthe Flutter widget tree. You can choose when to show the ad by calling `show()`. \n\n```scdoc\n_interstitiaAd.show();\n```\n\nOnce `show()` is called, an `Ad` displayed this way can't be dismissed\nprogrammatically and requires user input. An `InterstitialAd` can only be shown\nonce. Subsequent calls to show will trigger `onAdFailedToShowFullScreenContent`.\n\nAn ad must be disposed when access to it is no longer needed. The best practice\nfor when to call `dispose()` is in the\n`FullScreenContentCallback.onAdDismissedFullScreenContent` and\n`FullScreenContentCallback.onAdFailedToShowFullScreenContent` callbacks.\n\nThat's it! Your app is now ready to display interstitial ads.\n\nNext steps\n\n- See [Interstitial best\n practices](//www.youtube.com/watch?v=r2RgFD3Apyo&index=5&list=PLOU2XLYxmsIKX0pUJV3uqp6N3NeHwHh0c) and [interstitial ad guidance](//support.google.com/admob/answer/6066980).\n- Check out an [Interstitial ads case\n study](//admob.google.com/home/resources/freaking-math-powers-revenue-increase-with-google-admob-support/).\n- If you haven't already, create your own interstitial ad unit in the [AdMob\n UI](//apps.admob.com/).\n\nComplete example on GitHub\n\n[Interstitial](//github.com/googleads/googleads-mobile-flutter/tree/main/samples/admob/interstitial_example)"]]