Tencent GDT をメディエーションと統合する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
このガイドは、Tencent GDT で Google モバイル広告メディエーションを使用することを検討しているパブリッシャー様を対象としています。現在の Android アプリで動作するようにメディエーション アダプタを設定し、追加の設定を構成する手順について説明します。
前提条件
役立つプリマー
以下に、調停に関する背景情報をまとめたヘルプセンター記事のリンクをご紹介します。
プロジェクトに Tencent GDT を追加する
ネットワーク アダプターと SDK を含める
上記のリンクから Tencent GDT 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'])
// ...
}
Tencent GDT のドキュメントに記載されている手順に沿って、AndroidManifest.xml
ファイルを変更します。
アプリで Tencent GDT を直接呼び出す必要はありません。Google Mobile Ads SDK が Tencent GDT アダプタを呼び出して、広告を取得します。必要に応じて、追加のリクエスト パラメータを指定できます。このページの残りの部分では、Tencent GDT に詳細情報を提供する方法について詳しく説明します。
Activity インスタンスを使用して広告オブジェクトを初期化する
新しい広告オブジェクト(AdView
など)のコンストラクタで、Context
型のオブジェクトを渡す必要があります。この Context
は、メディエーションを使用する際に他の広告ネットワークに渡されます。広告ネットワークによっては、制限がさらに厳しい Activity
の Context
が要求され、Activity
インスタンスがなければ広告を配信できない場合もあります。そのため、メディエーション広告ネットワークでのエクスペリエンスが一貫したものになるよう、広告オブジェクトの初期化時に Activity
インスタンスを渡すことをおすすめします。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-02-08 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-02-08 UTC。"],[[["This guide explains how to integrate Tencent GDT ads into your Android app using Google Mobile Ads mediation."],["Publishers need an existing Android app with the Google Mobile Ads SDK and an AdMob account with configured mediation line items to begin."],["Integration involves adding the Tencent GDT SDK and adapter to your project, configuring the AndroidManifest.xml, and initializing ad objects with an Activity instance."],["Google Mobile Ads SDK handles communication with the Tencent GDT adapter; publishers don't need to directly interact with Tencent GDT."]]],["This guide details how publishers can integrate Tencent GDT with Google Mobile Ads mediation in Android apps. Key actions include downloading the Tencent GDT SDK and adapter, adding them to the project's `libs` folder, and updating the `AndroidManifest.xml` file as per Tencent GDT's instructions. Additionally, it recommends initializing ad objects with an `Activity` instance for broader ad network compatibility. The Google Mobile Ads SDK manages ad requests via the Tencent GDT adapter.\n"]]