Reputation: 5715
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.
// 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
Upvotes: 0
Views: 125
Reputation: 2650
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.
Upvotes: 0