广告聚合

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.X Chartboost Mediation 4.0.0
com.chartboost:helium com.chartboost:chartboost-mediation-sdk

Partner Adapters 🔗

Partner Network Helium 3.X Chartboost Mediation 4.0.0
AdMob com.chartboost:helium-admob com.chartboost:chartboost-mediation-adapter-admob
Amazon Publisher Services com.chartboost:helium-aps com.chartboost:chartboost-mediation-adapter-amazon-publisher-services
AppLovin com.chartboost:helium-applovin com.chartboost:chartboost-mediation-adapter-applovin
Chartboost com.chartboost:helium-chartboost com.chartboost:chartboost-mediation-adapter-chartboost
Digital Turbine Exchange com.chartboost:helium-fyber com.chartboost:chartboost-mediation-adapter-digital-turbine-exchange
Google Bidding com.chartboost:helium-googlebidding com.chartboost:chartboost-mediation-adapter-google-bidding
InMobi com.chartboost:helium-inmobi com.chartboost:chartboost-mediation-adapter-inmobi
IronSource com.chartboost:helium-ironsource com.chartboost:chartboost-mediation-adapter-ironsource
Meta Audience Network com.chartboost:helium-facebook com.chartboost:chartboost-mediation-adapter-meta-audience-network
Mintegral com.chartboost:helium-mintegral com.chartboost:chartboost-mediation-adapter-mintegral
Pangle com.chartboost:helium-pangle com.chartboost:chartboost-mediation-adapter-pangle
Unity Ads com.chartboost:helium-unityads com.chartboost:chartboost-mediation-adapter-unity-ads
Vungle com.chartboost:helium-vungle com.chartboost:chartboost-mediation-adapter-vungle

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.

Helium 3.x

  • HeliumInterstitialAd(String, HeliumInterstitialAdListener)
    
  • HeliumInterstitialAd(@NonNull String, @Nullable HeliumInterstitialAdListener)
    

Mediation 4.x

  • 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.

Helium 3.x

  • HeliumRewardedAd(String, HeliumRewardedAdListener)
    
  • HeliumRewardedAd(@NonNull String, @Nullable HeliumRewardedAdListener)
    

Mediation 4.x

  • 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.

Helium 3.x

  • 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
    

Mediation 4.x

  • // 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 🔗

Helium 3.x

  • 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
    

Mediation 4.x

  • // 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 🔗

Helium 3.x

  • 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
    

Mediation 4.x

  • // 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 🔗

Helium 3.x

  • val success = banner.clearAd()
    
  • boolean success = banner.clearAd();
    

Mediation 4.x

  • // The result of `clearAd()` is assumed to succeed.
    banner.clearAd()
    
  • // The result of `clearAd()` is assumed to succeed.
    banner.clearAd();
    

Interstitial 🔗

Helium 3.x

  • val success = interstitial.clearLoaded()
    
  • boolean success = interstitial.clearLoaded();
    

Mediation 4.x

  • // The result of `clearLoaded()` is assumed to succeed.
    interstitial.clearLoadedAd()
    
  • // The result of `clearLoaded()` is assumed to succeed.
    interstitial.clearLoaded();
    

Rewarded 🔗

Helium 3.x

  • val success = rewardedAd.clearLoaded()
    
  • boolean success = rewardedAd.clearLoaded();
    

Mediation 4.x

  • // 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.

Helium 3.x

  • // 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
    }
    

Mediation 4.x

  • // 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 🔗

Helium 3.x

  • // 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
    }
    

Mediation 4.x

  • // 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 🔗

Helium 3.x

  • // 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
    }
    

Mediation 4.x

  • // 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 🔗

Helium 3.x

  • // 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
    }
    

Mediation 4.x

  • // 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.