How to integrate Chartboost mediation in MoPub?

117 Views Asked by At

I am following MoPub documentation to setup mediation of Chartboost Network in MoPub.

I have successfully integrated Chartboost and MoPub separately.

I have an app in which MoPub integration is already done and running. Now I want to setup Chartboost mediation as well.

This is what I have done so far.

  • I have created an app on Chartboost and got App Id and App Signature
  • Added Chartboost Network in Mopub Networks and its status is Running and Connected.
  • Added AppId and App Signature of Chartboost in the MoPub Network settings.
  • Followed https://developers.mopub.com/publishers/mediation/integrate/ to integrate chartboost which suggest to import Chartboost jar and following dependency
       // 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'

What else I should do to complete this integration. Because My Chartboost dashboard does not enables "Request Publishing Permission" Button as it needs SDK to be integrated successfully.

PS : My app is already live on google play

1

There are 1 best solutions below

0
S. Gissel On

Your build.gradle should import Chartboost SDK and Chartboost MoPub adapter.

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

Initialize the MoPub SDK with Chartboost as mediated network.

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);

In your log your will see something like that.

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

Your Chartboost SDK is initialized now. Good luck.