IMA 로드 시간 개선
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
IMA SDK는 광고를 요청하고, 조회 가능성을 측정하고, 광고 노출을 보고하는 종속 항목을 로드합니다. 광고를 요청하기 전에 IMA를 초기화하면 광고 재생 전에 IMA 종속 항목을 로드하는 시간을 최대화할 수 있습니다. 이 페이지에서는 앱에서 IMA 로드 시간을 처리하는 방법을 설명합니다.
ImaSdkFactory.initialize()
에 전화하기
ImaSdkFactory.initialize()
메서드는 첫 번째 광고 요청 전에 SDK 리소스를 미리 로드하기 시작합니다. initialize()
를 사용하려면 IMA 버전 3.35.1 이상이 필요합니다.
애플리케이션 시작 시 또는 앱 구조가 허용하는 대로 애플리케이션 수명 주기 초기에 ImaSdkFactory.initialize()
를 호출합니다. initialize()
호출은 다음 매개변수를 사용합니다.
context
: 애플리케이션 수명 주기 중에 항상 사용할 수 있는 애플리케이션 컨텍스트를 사용합니다.
settings
: 값이 설정된 ImaSdkSettings
객체를 전달합니다. initialize()
호출에 사용된 IMA 설정은 createAdsLoader()
호출에 사용된 설정 값과 동일해야 합니다. IMA SDK는 이러한 설정, 특히 언어 설정을 캐시 키에 활용합니다. 캐시 누락이 발생하고 광고 로드 시간이 늘어날 수 있으므로 initialize()
메서드 호출에 사용되는 설정에 테스트 또는 가짜 값을 사용하는 것은 권장하지 않습니다.
AdsLoader
인스턴스 재사용
IMA 로드 시간을 개선하려면 동일한 AdsLoader
인스턴스를 재사용하는 것이 좋습니다. AdsLoader
인터페이스는 여러 광고 또는 스트림 요청을 처리할 수 있습니다.
요청마다 새 AdsLoader
인스턴스를 만들지 마세요. 새 AdsLoader
인스턴스를 만들려면 로드 시간이 필요하며 추가 기기 리소스가 사용됩니다.
재생 전에 광고 요청
광고 재생을 시작하기 전에 AdsLoader
인스턴스에 액세스할 수 있는 경우 AdsLoader.requestAds()
메서드를 일찍 호출할 수도 있습니다. 이 호출을 하면 프리롤 광고 로드가 시작됩니다. 사용자가 콘텐츠 재생을 시작할 준비가 되면 AdsManager.init()
메서드를 호출하고 LOADED
이벤트가 광고를 재생할 때까지 기다립니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-31(UTC)
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[],[],null,["# Improve IMA load time\n\nThe IMA SDK loads dependencies to request ads, measure viewability and\nreport ad impressions. By initializing IMA before you make an ad request, you\nmaximize the time to load IMA dependencies before ad playback. This page covers\nhow to handling IMA load times in your app.\n\nCall `ImaSdkFactory.initialize()`\n---------------------------------\n\nThe\n[`ImaSdkFactory.initialize()`](/interactive-media-ads/docs/sdks/android/client-side/api/reference/com/google/ads/interactivemedia/v3/api/ImaSdkFactory#initialize(android.content.Context,com.google.ads.interactivemedia.v3.api.ImaSdkSettings))\nmethod starts to preload SDK resources in advance of the first ad request. To\nuse `initialize()`, you need IMA version 3.35.1 or higher.\n\nCall `ImaSdkFactory.initialize()` on application startup, or as early in the\napplication's lifecycle as your app structure allows. The `initialize()` call\ntakes the following parameters:\n\n- **`context`**: Uses the application context, which is always available during the lifecycle of the application.\n- **`settings`** : Pass the an [`ImaSdkSettings`](/interactive-media-ads/docs/sdks/android/client-side/api/reference/com/google/ads/interactivemedia/v3/api/ImaSdkSettings) object with its values set. The IMA settings used in the `initialize()` call must be the same as the settings values used in the `createAdsLoader()` call. The IMA SDK utilizes these settings, particularly the language setting, for cache key. We don't recommend using test or fake values for the settings used in the `initialize()` method call, as cache misses might occur and increase ad load time.\n\nReuse the `AdsLoader` instance\n------------------------------\n\nTo improve IMA load time, we recommend you reuse the same\n[`AdsLoader`](/interactive-media-ads/docs/sdks/android/client-side/api/reference/com/google/ads/interactivemedia/v3/api/AdsLoader)\ninstance. The `AdsLoader` interface can handle multiple ad or stream requests.\nAvoid creating a new `AdsLoader` instance for each request. Creating a new\n`AdsLoader` instance requires a load time, and uses additional device resources.\n\nRequest ads in advance of playback\n----------------------------------\n\nIf you have access to the `AdsLoader` instance prior to starting ad playback,\nyou can also call the\n[`AdsLoader.requestAds()`](/interactive-media-ads/docs/sdks/android/client-side/api/reference/com/google/ads/interactivemedia/v3/api/AdsLoader#requestAds(com.google.ads.interactivemedia.v3.api.AdsRequest))\nmethod early. Making this call starts loading pre-roll ads. When the user\nis ready to start content playback, call the\n[`AdsManager.init()`](/interactive-media-ads/docs/sdks/android/client-side/api/reference/com/google/ads/interactivemedia/v3/api/BaseManager#init())\nmethod and wait for the `LOADED` event to play ads."]]