【问题标题】:How to integrate Chartboost mediation in MoPub?如何在 MoPub 中集成 Chartboost 中介?
【发布时间】:2020-06-26 15:06:04
【问题描述】:

我正在按照 MoPub 文档在 MoPub 中设置 Chartboost 网络的中介。

我已经成功分别集成了 Chartboost 和 MoPub。

我有一个应用程序,其中 MoPub 集成已经完成并正在运行。现在我也想设置 Chartboost 中介。

这是我到目前为止所做的。

  • 我在 Chartboost 上创建了一个应用程序并获得了应用程序 ID 和应用程序签名
  • 在 Mopub 网络中添加了 Chartboost 网络,其状态为正在运行和已连接。
  • 在 MoPub 网络中添加 Chartboost 的 AppId 和 App Signature 设置。
  • 已关注https://developers.mopub.com/publishers/mediation/integrate/ 集成 chartboost 建议导入 Chartboost jar 和 跟随依赖
       // Chartboost
    // This mediated network SDK is not available on JCenter. Ensure you have downloaded and imported it manually into your app project.

    implementation 'com.mopub.mediation:chartboost:7.5.0.3'

我还应该做些什么来完成这个集成。因为我的 Chartboost 仪表板没有启用“请求发布权限”按钮,因为它需要 SDK 成功集成。

PS : 我的应用已经在 google play 上上线了

【问题讨论】:

    标签: android mopub chartboost


    【解决方案1】:

    您的 build.gradle 应导入 Chartboost SDK 和 Chartboost MoPub 适配器。

    implementation 'com.chartboost:chartboost-sdk:8.2.0'
    implementation 'com.mopub.mediation:chartboost:8.2.0.3'
    

    使用 Chartboost 作为中介网络初始化 MoPub SDK。

    Map<String, String> chartboostSettings = new HashMap<>();
    chartboostSettings.put("APP_ID_KEY", "my app id");
    chartboostSettings.put("APP_SIGNATURE_KEY", "my app signature");
    
    SdkConfiguration sdkConfiguration = new SdkConfiguration.Builder(activity.getString("mopubBannerID"))
                .withLogLevel(BuildConfig.DEBUG ? MoPubLog.LogLevel.DEBUG : MoPubLog.LogLevel.NONE)
                .withMediatedNetworkConfiguration(ChartboostAdapterConfiguration.class.getName(), chartboostSettings)
                .build();
    
    MoPub.initializeSdk(activity, sdkConfiguration, listener or null);
    

    在您的日志中,您会看到类似的内容。

    I/MoPub: [com.mopub.common.AdapterConfigurationManager][onNetworkInitializationFinished] SDK Log - class com.mopub.mobileads.ChartboostAdapterConfiguration initialized with error code AdapterConfiguration initialization success.
    

    您的 Chartboost SDK 现在已初始化。祝你好运。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-07-20
      • 2021-02-26
      • 1970-01-01
      • 1970-01-01
      • 2023-03-08
      • 1970-01-01
      • 1970-01-01
      • 2020-11-20
      相关资源
      最近更新 更多