Migration from Helium 3.X to Chartboost Mediation 4.0.0

Artifactory

As part of Chartboost’s rebranding efforts, Chartboost Mediation 4.0.0 will be using all new maven packages. Use the tables below to assist in migrating from the old maven packages to the updated maven packages.

Chartboost Mediation SDK

Helium 3.XChartboost Mediation 4.0.0
com.chartboost:heliumcom.chartboost:chartboost-mediation-sdk

Partner Adapters

Partner NetworkHelium 3.XChartboost Mediation 4.0.0
AdColonycom.chartboost:helium-adcolonycom.chartboost:chartboost-mediation-adapter-adcolony
AdMobcom.chartboost:helium-admobcom.chartboost:chartboost-mediation-adapter-admob
Amazon Publisher Servicescom.chartboost:helium-apscom.chartboost:chartboost-mediation-adapter-amazon-publisher-services
AppLovincom.chartboost:helium-applovincom.chartboost:chartboost-mediation-adapter-applovin
Chartboostcom.chartboost:helium-chartboostcom.chartboost:chartboost-mediation-adapter-chartboost
Digital Turbine Exchangecom.chartboost:helium-fybercom.chartboost:chartboost-mediation-adapter-digital-turbine-exchange
Google Biddingcom.chartboost:helium-googlebiddingcom.chartboost:chartboost-mediation-adapter-google-bidding
InMobicom.chartboost:helium-inmobicom.chartboost:chartboost-mediation-adapter-inmobi
IronSourcecom.chartboost:helium-ironsourcecom.chartboost:chartboost-mediation-adapter-ironsource
Meta Audience Networkcom.chartboost:helium-facebookcom.chartboost:chartboost-mediation-adapter-meta-audience-network
Mintegralcom.chartboost:helium-mintegralcom.chartboost:chartboost-mediation-adapter-mintegral
Panglecom.chartboost:helium-panglecom.chartboost:chartboost-mediation-adapter-pangle
Tapjoycom.chartboost:helium-tapjoycom.chartboost:chartboost-mediation-adapter-tapjoy
Unity Adscom.chartboost:helium-unityadscom.chartboost:chartboost-mediation-adapter-unity-ads
Vunglecom.chartboost:helium-vunglecom.chartboost:chartboost-mediation-adapter-vungle
Yahoocom.chartboost:helium-yahoocom.chartboost:chartboost-mediation-adapter-yahoo

See Integrate Network SDKs - Adapter Separation for additional information.


Public API

Helium Name

The HeliumSdk name will currently stay for the duration of 4.x. We will deprecate this during the 4.x series and provide migration docs when we move over to the new Chartboost Mediation APIs.

Constructors

Interstitial

The constructor for HeliumInterstitialAd has been changed to include Context as the first parameter. The placement name param (String) is now the second parameter.

HeliumInterstitialAd(String, HeliumInterstitialAdListener)
HeliumInterstitialAd(@NonNull String, @Nullable HeliumInterstitialAdListener)
HeliumInterstitialAd(Context, String, HeliumFullscreenAdListener?)
HeliumInterstitialAd(@NonNull Context, @NonNull String, @Nullable HeliumFullscreenAdListener)

Rewarded

The constructor for HeliumRewardedAd has been changed to include Context as the first parameter. The placement name param (String) is now the second parameter.

HeliumRewardedAd(String, HeliumRewardedAdListener)
HeliumRewardedAd(@NonNull String, @Nullable HeliumRewardedAdListener)
HeliumRewardedAd(Context, String, HeliumFullscreenAdListener?)
  HeliumRewardedAd(@NonNull Context, @NonNull String, @Nullable HeliumFullscreenAdListener)

Load Request Identifier

The load request identifier has been moved from being a return value from loads to a parameter in the load completion listener callback.

Banner

val banner = HeliumBannerAd([params])
val loadId = banner.load()
// loadId holds the request identifier
HeliumBannerAd banner = new HeliumBannerAd([params])
String loadId = banner.load()
// loadId holds the request identifier
// in HeliumBannerAdListener
fun onAdCached(placementName: String, loadId: String, winningBidInfo: Map<String, String>, error: ChartboostMediationAdException?) {
    // loadId holds the request identifier
}
// in HeliumBannerAdListener
public void onAdCached(String placementName, String loadId, Map<String, String> winningBidInfo, ChartboostMediationAdException error) {
    // loadId holds the request identifier
}

Interstitial

val interstitial = HeliumInterstitialAd([params])
val loadId = interstitial.load()
// loadId holds the request identifier
HeliumInterstitialAd interstitial = new HeliumInterstitialAd([params]);
String loadId = interstitial.load();
// loadId holds the request identifier
// in HeliumFullscreenAdListener
fun onAdCached(placementName: String, loadId: String, winningBidInfo: Map<String, String>, error: ChartboostMediationAdException?) {
    // loadId holds the request identifier
}
// in HeliumFullscreenAdListener
public void onAdCached(String placementName, String loadId, Map<String, String> winningBidInfo, ChartboostMediationAdException error) {
    // loadId holds the request identifier
}

Rewarded

val rewardedAd = HeliumRewardedAd([params])
val loadId = rewardedAd.load()
// loadId holds the request identifier
HeliumRewardedAd rewardedAd = new HeliumRewardedAd([params]);
String loadId = rewardedAd.load();
// loadId holds the request identifier
// in HeliumFullscreenAdListener
fun onAdCached(placementName: String, loadId: String, winningBidInfo: Map<String, String>, error: ChartboostMediationAdException?) {
    // loadId holds the request identifier
}
// in HeliumFullscreenAdListener
public void onAdCached(String placementName, String loadId, Map<String, String> winningBidInfo, ChartboostMediationAdException error) {
    // loadId holds the request identifier
}

Clear Loaded Ad

Banner

val success = banner.clearAd()
boolean success = banner.clearAd();
// The result of `clearAd()` is assumed to succeed.
banner.clearAd()
// The result of `clearAd()` is assumed to succeed.
banner.clearAd();

Interstitial

val success = interstitial.clearLoaded()
boolean success = interstitial.clearLoaded();
// The result of `clearLoaded()` is assumed to succeed.
interstitial.clearLoadedAd()
// The result of `clearLoaded()` is assumed to succeed.
interstitial.clearLoaded();

Rewarded

val success = rewardedAd.clearLoaded()
boolean success = rewardedAd.clearLoaded();
// The result of `clearLoaded()` is assumed to succeed.
rewarded.clearLoaded()
// The result of `clearLoaded()` is assumed to succeed.
rewardedAd.clearLoaded();

Merge Winning Bid Information with Load Completion

The optional winning bid delegates have been merged into the load completion delegate callbacks.

Banner

// in HeliumBannerAdListener
fun didReceiveWinningBid(placementName: String, bidInfo: HashMap<String, String>) {
    // handle bidInfo
}
// in HeliumBannerAdListener
public void didReceiveWinningBid(String placementName, HashMap<String, String> bidInfo) {
    // handle bidInfo
}
// in HeliumBannerAdListener
fun onAdCached(placementName: String, loadId: String, winningBidInfo: Map<String, String>, error: ChartboostMediationAdException?) {
    // handle winningBidInfo
}
// in HeliumBannerAdListener
public void onAdCached(String placementName, String loadId, Map<String, String> winningBidInfo, ChartboostMediationAdException error) {
    // handle winningBidInfo
}

Interstitial

// in HeliumInterstitialAdListener
fun didReceiveWinningBid(placementName: String, bidInfo: HashMap<String, String>) {
    // handle bidInfo
}
// in HeliumInterstitialAdListener
public void didReceiveWinningBid(String placementName, HashMap<String, String> bidInfo) {
    // handle bidInfo
}
// in HeliumFullscreenAdListener
fun onAdCached(placementName: String, loadId: String, winningBidInfo: Map<String, String>, error: ChartboostMediationAdException?) {
    // handle winningBidInfo
}
// in HeliumFullscreenAdListener
public void onAdCached(String placementName, String loadId, Map<String, String> winningBidInfo, ChartboostMediationAdException error) {
    // handle winningBidInfo
}

Rewarded

// in HeliumRewardedAdListener
fun didReceiveWinningBid(placementName: String, bidInfo: HashMap<String, String>) {
    // handle bidInfo
}
// in HeliumRewardedAdListener
public void didReceiveWinningBid(String placementName, HashMap<String, String> bidInfo) {
    // handle bidInfo
}
// in HeliumFullscreenAdListener
fun onAdCached(placementName: String, loadId: String, winningBidInfo: Map<String, String>, error: ChartboostMediationAdException?) {
    // handle winningBidInfo
}
// in HeliumFullscreenAdListener
public void onAdCached(String placementName, String loadId, Map<String, String> winningBidInfo, ChartboostMediationAdException error) {
    // handle winningBidInfo
}

New Rewarded Callback

The string value from the old reward callback has been removed since it never provided useful information.

Rewarded

// in HeliumRewardedAdListener
fun didReceiveReward(placementName: String, reward: String) {
    // Old reward was a String and never provided useful information
}
// in HeliumFullscreenAdListener
public void didReceiveReward(String placementName, String reward) {
    // Old reward was a String and never provided useful information
}
// in HeliumFullscreenAdListener
fun onAdRewarded(placementName: String) {
    // Rewarding was successful
}
// in HeliumFullscreenAdListener
public void onAdRewarded(String placementName) {
    // Rewarding was successful
}

Error Codes

Helium 4.0.0 introduces a new system of errors (plus dozens of brand new ones) complete with diagnosis and recommendation.

See Error Codes for more information.