本指南介绍了如何使用 Google 移动广告 SDK 通过中介(涵盖广告瀑布流集成)从 i-mobile 加载和展示广告。其中介绍了如何将 i-mobile 添加到广告单元的中介配置中,以及如何将 i-mobile SDK 和适配器集成到 Unity 应用中。
i-mobile 的信息中心界面使用日语文本作为标签、按钮和说明。本指南中的屏幕截图尚未翻译。不过,在本指南的说明和说明中,标签和按钮在翻译后会用英文括号括起来。
支持的集成和广告格式
适用于 i-mobile 的 AdMob 中介适配器具有以下功能:
集成 | |
---|---|
出价 | |
瀑布 | |
表现形式 | |
横幅 | |
插页式广告 | |
已奖励 |
要求
- Unity 5.6 或更高版本
- 最新版 Google 移动广告 SDK
- 在 Android 上部署
- Android API 级别 21 或更高级别
- 在 iOS 上部署
- iOS 部署目标为 12.0 或更高版本
- 使用 Google 移动广告 SDK 配置的有效 Unity 项目。如需了解详情,请参阅开始使用。
- 看完中介服务入门指南
第 1 步:在 i-mobile 界面中设置配置
Sign up or log in to your i-mobile account.
Add your app to the i-mobile dashboard by clicking the サイト/アプリ管理 (Site/Application Management) tab and the button for your app's platform.
Android
iOS
Fill out the form and click the 新規登録 (Sign up) button.
Android
iOS
To create a new Advertising Spot, select your app under the サイト/アプリ管理 (Site/Application Management) tab.
Android
iOS
Navigate to the 広告スポット管理 (Ad Spot Management) tab and click the 新規広告スポット (New Ad Spot) button.
Next, fill out the form by providing the 広告スポット名 (Ad Spot name), 広告スポットサイズ (Ad Spot size) and other details. Then, click the 新規登録 (Sign up) button.
Your new Ad spot is ready. To view its integration details, click the アプリ設定取得 (Get App settings) button.
Take note of the パブリッシャーID (Publisher ID), メディアID (Media ID), and スポットID (Spot ID). You'll need these parameters later when configuring i-mobile for mediation in the AdMob UI.
Android
iOS
第 2 步:在界面中设置 i-mobile 需求 AdMob
为广告单元配置中介设置
第 3 步:导入 i-mobile SDK 和适配器
通过更新日志中的下载链接下载适用于 i-mobile 的最新版 Google 移动广告中介插件,然后从 ZIP 文件中提取 GoogleMobileAdsIMobileMediation.unitypackage
。
在 Unity 项目编辑器中,依次选择 Assets > Import Package > Custom Package,然后找到您下载的 GoogleMobileAdsIMobileMediation.unitypackage
文件。确保选择所有文件,然后点击 Import。
然后,依次选择 Assets > Play Services Resolver > Android Resolver > Force Resolve。Unity Play Services Resolver 库将从头开始执行依赖项解析,并将声明的依赖项复制到 Unity 应用的 Assets/Plugins/Android
目录中。
第 4 步:需要其他代码
Android
i-mobile 集成无需额外代码。
iOS
SKAdNetwork 集成
按照 i-mobile 的文档中的说明,将 SKAdNetwork 标识符添加到项目的 Info.plist
文件中。
第 5 步:测试实现效果
启用测试广告
请务必为 AdMob。 i-mobile 提供用于测试的测试 Spot ID、媒体 ID 和发布商 ID,您可以在此处找到它们。
验证测试广告
如需验证您收到的是来自i-mobile的测试广告,请使用相应广告来源在广告检查器中启用单一广告来源测试。 i-mobile (Waterfall)
错误代码
如果适配器未能接收来自 i-mobile 的广告,发布商可以使用以下类下的 ResponseInfo
检查广告响应中的潜在错误:
Android
格式 | 类名称 |
---|---|
横幅 | com.google.ads.mediation.imobile.IMobileAdapter |
插页式广告 | com.google.ads.mediation.imobile.IMobileAdapter |
原生 | com.google.ads.mediation.imobile.IMobileMediationAdapter |
iOS
格式 | 类名称 |
---|---|
横幅 | IMobileAdapter |
插页式广告 | IMobileAdapter |
原生 | GADMediationAdapterIMobile |
当广告加载失败时,i-mobile 适配器会抛出以下代码和随附的消息:
Android
错误代码 | 原因 |
---|---|
0-99 | i-mobile SDK 返回了错误。如需了解详情,请参阅代码。 |
101 | i-mobile 需要 Activity 上下文才能加载广告。 |
102 | 界面中配置的 i-mobile 服务器参数缺失/无效。 AdMob |
103 | 请求的广告尺寸与 i-mobile 支持的横幅尺寸不匹配。 |
104 | i-mobile 的原生广告加载成功回调返回了一个空的原生广告列表。 |
iOS
错误代码 | 原因 |
---|---|
0-10 | i-mobile SDK 返回了错误。如需了解详情,请参阅代码。 |
101 | 界面中配置的 i-mobile 服务器参数缺失/无效。 AdMob |
102 | 请求的广告尺寸与 i-mobile 支持的横幅尺寸不匹配。 |
103 | i-mobile 无法展示广告。 |
104 | i-mobile 返回了一个空的原生广告数组。 |
105 | i-mobile 未能下载原生广告素材资源。 |
106 | i-mobile 不支持使用同一 Spot ID 请求多个插页式广告。 |
i-mobile Unity 中介插件更新日志
版本 1.3.5
- 支持 i-mobile Android 适配器版本 2.3.2.0。
- 支持 i-mobile iOS 适配器版本 2.3.4.0。
- 利用 Google 移动广告 Unity 插件 9.1.0 版进行制作和测试。
版本 1.3.4
- 支持 i-mobile Android 适配器版本 2.3.1.2。
- 支持 i-mobile iOS 适配器版本 2.3.4.0。
- 利用 Google 移动广告 Unity 插件 9.0.0 版进行制作和测试。
版本 1.3.3
- 支持 i-mobile Android 适配器版本 2.3.1.1。
- 支持 i-mobile iOS 适配器版本 2.3.3.0。
- 利用 Google 移动广告 Unity 插件 9.0.0 版进行制作和测试。
版本 1.3.2
- 将适配器内容移到了
GoogleMobileAds/Mediation/IMobile/
。 - 支持 i-mobile Android 适配器版本 2.3.1.1。
- 支持 i-mobile iOS 适配器版本 2.3.2.0。
- 利用 Google 移动广告 Unity 插件 8.1.0 版进行制作和测试。
版本 1.3.1
- 支持 i-mobile Android 适配器版本 2.3.0.0。
- 支持 i-mobile iOS 适配器版本 2.3.0.1。
- 使用 Google 移动广告 Unity 插件 7.4.1 版进行制作和测试。
版本 1.3.0
- 支持 i-mobile Android 适配器版本 2.3.0.0。
- 支持 i-mobile iOS 适配器版本 2.3.0.0。
- 利用 Google 移动广告 Unity 插件 7.3.1 版进行制作和测试。
版本 1.2.2
- 支持 i-mobile Android 适配器版本 2.0.23.1。
- 支持 i-mobile iOS 适配器版本 2.2.0.1。
- 使用 Google 移动广告 Unity 插件 7.0.2 版进行构建和测试。
版本 1.2.1
- 支持 i-mobile Android 适配器版本 2.0.23.0。
- 支持 i-mobile iOS 适配器版本 2.2.0.1。
- 使用 Google 移动广告 Unity 插件 7.0.0 版进行制作和测试。
版本 1.2.0
版本 1.1.0
版本 1.0.2
版本 1.0.1
版本 1.0.0
- 第一个版本!
- 支持 i-mobile Android 适配器版本 2.0.20.1。
- 支持 i-mobile iOS 适配器版本 2.0.29.0。