整合 Zucks 和中介服務
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本指南適用於有意使用 Google 行動廣告中介服務搭配 Zucks 的發布商。這份文件會逐步說明如何設定中介服務適配器,以便與目前的 Android 應用程式搭配運作,以及如何設定其他設定。
必要條件
實用的入門指南
以下說明中心文章提供仲裁的背景資訊:
在專案中加入 Zucks
加入網路轉接程式和 SDK
請從前述連結下載 Zucks SDK 和轉接程式。
在 Android Studio 中,將轉接程式和 SDK 檔案加入專案的 libs
資料夾。請確認應用程式層級的 Gradle 檔案包含下列內容:
Kotlin
dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.aar", "*.jar"))))
// ...
}
Groovy
dependencies {
implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'])
// ...
}
按照 Zucks 說明文件中的指示修改 AndroidManifest.xml
檔案。
您的應用程式不需要直接呼叫 Zucks,Google Mobile Ads SDK 會代您呼叫 Zucks 轉接程式,以便擷取廣告。如有需要,您可以指定任何其他要求參數。本頁其餘部分會詳細說明如何向 Zucks 提供更多資訊。
使用活動例項初始化廣告物件
在新廣告物件 (例如 AdView
) 的建構函式中,您必須傳入 Context
類型的物件。使用中介服務時,這個 Context
會傳遞至其他廣告聯播網。部分廣告聯播網需要使用限制較嚴格的 Context
,類型為 Activity
,且可能無法在沒有 Activity
執行個體的情況下放送廣告。因此,建議您在初始化廣告物件時傳入 Activity
例項,確保與中介廣告聯播網的一致體驗。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-02-08 (世界標準時間)。
[[["容易理解","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-02-08 (世界標準時間)。"],[[["The Mediation Test Suite allows you to test whether your mediation setup is configured correctly before going live to ensure ad requests and revenue are flowing as expected."],["By integrating the Mediation Test Suite into your app, you gain access to detailed, real-time insights into the ad mediation waterfall to troubleshoot setup problems quickly."],["The suite offers comprehensive functionalities such as manual ad requests for testing specific scenarios, a visual ad request waterfall, and adapter status reports to monitor adapter configuration."],["It enables you to manage and organize multiple ad units and ad sources within the test suite, including line item details and other properties for each ad source."],["This ensures a seamless and optimized ad mediation experience, leading to higher fill rates, increased ad revenue, and improved app performance."]]],["Publishers using Google Mobile Ads mediation with Zucks should integrate the Zucks SDK and adapter into their Android app via Android Studio's `libs` folder and update their app-level Gradle file. They must also configure the `AndroidManifest.xml` according to Zucks' documentation. An `Activity` instance should be passed when initializing ad objects for mediated ad networks. The Google Mobile Ads SDK handles fetching ads via the Zucks adapter, without direct calls from the app.\n"]]