本主题介绍如何将 InMobi SDK 渲染插件与 Prebid SDK 和 Prebid 服务器集成。有关 Prebid 插件渲染器以及此设置工作原理的更多信息,请参阅Prebid 插件渲染器(标头竞价)。
plc 。更多信息,请参阅InMobi 的 Header Bidding 页面。在你的应用程序build.gradle文件中,添加以下内容:
implementation <span class="hljs-string">"com.inmobi.monetization:inmobi-prebid-adapter:10.8.2.0"</span>
implementation <span class="hljs-string">"com.inmobi.monetization:inmobi-ads-kotlin:10.8.2"</span>
在初始化 Prebid SDK 之前,请先注册 InMobi 渲染器:
<span class="hljs-selector-tag">PrebidMobile</span><span class="hljs-selector-class">.registerPluginRenderer</span>(
InMobiRenderer.<span class="hljs-built_in">getInstance</span>(
this,
new <span class="hljs-built_in">InMobiMediationConfiguration</span>(<span class="hljs-string">"<<account_id>>"</span>,
new <span class="hljs-built_in">InMobiRendererInitListener</span>() {
<span class="hljs-variable">@Override</span>
public void <span class="hljs-built_in">onInitCompleted</span>(<span class="hljs-variable">@Nullable</span> Error error) {
System.out.<span class="hljs-built_in">println</span>(<span class="hljs-string">"InMobi SDK initialized"</span>);
}
}
)
)
);
如果您的应用已经通过其他中介使用了 InMobi SDK,则必须提供相同的帐户 ID。
By installing this SDK update, you agree that your Children Privacy Compliance setting remains accurate or that you will update that setting, whenever there is a change in your app's audience. You may update the app's Children Privacy Compliance settings at https://publisher.inmobi.com/my-inventory/app-and-placements.
Support Center