Android & Amazon – Chartboost Help

Android & Amazon

Download & integrate the Chartboost SDK for Android and Amazon ▶
Note: Amazon integration uses the same SDK as Android.

Version 7.0.0 (August 4, 2017) (current version) 

  • SDK 7.0.0 is a major release that focuses on quality and stability while adding some new features.
API Changes:
  • Changed behavior of Chartboost.setShouldRequestInterstitialsInFirstSession to match the iOS SDK:
    • This setting now only applies to interstitial ads. It no longer applies to rewarded video ads.
    • This setting will now be checked whether or not there is a delegate set. SDK 6 and below only checked the value if a delegate had been set.
  • Removed MoreApps support and deprecated API methods:
    • Chartboost.hasMoreApps() will always return false.
    • Chartboost.cacheMoreApps() and showMoreApps() will both call didFailToLoadMoreApps(location, END_POINT_DISABLED).
  • Deprecated Chartboost.isWebviewEnabled()
  • Removed the unused EMPTY_LOCAL_AD_LIST error code.
  • Added VIDEO_UNAVAILABLE_FOR_CURRENT_ORIENTATION error code, which can occur when playing a native ad.
  • InPlay changes:
    • CBInPlay.getAppIcon will now throw an exception if there is a failure to load the icon file or to decode it as a bitmap.
    • Added public final fields to CBInPlay (appName, location, largeAppIconUrl, largeAppIconFile).
    • The sample app was erroneously checking CBInPlay.hasInPlay() after calling CBInPlay.getInPlay(). It now uses the getInPlay() result without checking hasInPlay()
Fixes:
  • Fixed typos in sample app and permission entry in AndroidManifest.xml.
  • The same ads are no longer returned for the first few requests after startup.
Improvements:
  • Implemented better support for Exchange ads.
  • Implemented better support for interactive ads.
  • MRAID 2.0 is now supported.
  • Improved Prefetch.
  • Reduced DEX method count.
  • AdUnit assets are handled in arbitrary subdirectories.
  • If a bitmap or video is found to be corrupt when attempting to show an ad, we now delete the underlying file and call didFailToLoad on the delegate.
  • Removed MoreApps from ChartboostExampleApp.
  • willDisplayVideo delegate is called before starting CBImpressionActivity. This is primarily so that on Unity, the willDisplayVideo callback will be executed before the ad shows, rather than after.
  • Added a delay with exponential back-off between ad cache or show failures.

Version 6.6.3 (March 30, 2017) 

Fixes:
  • Fixed NullPointerException issue when showing rewarded video.

Version 6.6.2 (March 20, 2017)  

Fixes:
  • Fixed NullPointerException issue when downloading assets.
  • Reconnecting to internet when caching or showing ads no longer produces INTERNET_UNAVAILABLE error.
  • Fixed crashes when Google Play Services is not integrated on non-Kindle devices.
  • Resolved value changes in getDisplayMetrics().heightPixels.
  • Clarified ad server error messaging when no publisher campaigns are available.

Version 6.6.1 (November 3, 2016)  

Fixes:
  • Fixed crashes with ironSource mediation.
  • Fixed a bug where cached ads were not shared between activities.
  • Fixed crashes with Fyber mediation.
  • Fixed an issue where the close button was being misplaced.
  • Fixed crashes with Corona mediation rewarded video.
closeImpression() functionality has been deprecated.

Version 6.6.0 (October 13, 2016)  

Features:
  • Added support for additional mediation partners.
  • InPlay works again in the Example App.
Improvements:
  • Added reasoning for certain app permissions in the manifest.
  • Reduced DEX method count by 606 in com.chartboost and 629 overall.
Fixes:
  • MoreApps page will no longer fail to show with loading bar enabled.
  • didShow delegate could be called when an ad was actually not shown.
  • Update device identifiers on every request.
  • Fixed an issue where the close button was being misplaced.
  • Optimized template parameter replacement.
  • Fixed a NullPointerException when backgrounding the app.

Version 6.5.1 (Sept. 1, 2016) 

Fixes:
  • Invalid server responses no longer accepted as valid.

Version 6.5.0 (August 11, 2016)

Features & Improvements:
  • The example app CBSample has been renamed ChartboostExampleApp.
  • ChartboostExampleApp has been updated to better showcase Chartboost SDK features.
  • Chartboost SDK now uses network compression, improving performance.
  • Previously deprecated methods and classes now removed:
    • ChartboostActivity class
    • boolean getIgnoreErrors()
    • void setIgnoreErrors(boolean ignoreErrors)
    • void didPassAgeGate(boolean pass)
    • void setShouldPauseClickForConfirmation(boolean shouldPause)
    • void clearCache()
    • void setFramework (final CBFramework framework)
    • boolean getImpressionsUseActivities()
    • void setImpressionsUseActivities(final boolean impressionsUseActivities)
    • void didPauseClickForConfirmation()
    • void didPauseClickForConfirmation(Activity activity)
Fixes:
  • Fixed an issue in which pressing the back button did not call the dismiss/close delegates.
  • A cached ad will no longer fail to show.
  • SDK will no longer keep 0 byte files in cache when a download fails.
  • Video ads no longer stay paused after maximizing a minimized app.

Version 6.4.2 (June 30, 2016)

Features & Improvements:
  • The Chartboost Android SDK no longer supports the age gate feature. API methods related to age gate are being deprecated and will be removed in a future release.
  • Publishers only: All Chartboost ads are now shown using CBImpressionActivity. You must add CBImpressionActivity to your AndroidManifest.xml file, like this:
    <activity android:name="com.chartboost.sdk.CBImpressionActivity"
                     android:excludeFromRecents="true"
                     android:hardwareAccelerated="true"
                     android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
                     android:configChanges="keyboardHidden|orientation|screenSize" />
    Note: Make sure hardware acceleration is added and enabled when declaring the CBImpressionActivity in the manifest.
Fixes:
  • Media loading is now more efficient.
  • Memory usage on devices has been optimized.
  • Video download is now more efficient.
  • Fixed ConcurrentModificationException occurring in some devices.
  • Fixed issue with video playback when backgrounding.
  • Fixed IMPRESSION_ALREADY_VISIBLE error.

Version 6.4.1 (Mar. 25, 2016) (current version)

Fixes:
  • Various bug fixes.

Version 6.4.0 (Mar. 14, 2016)

  • With this SDK we will begin rolling out a brand new Chartboost Video experience, specially tailored for games. Upgrade now!
  • We’ve also improved key features like video caching, memory management, and data usage for optimal SDK performance.
Features & improvements:
  • New method setActivityCallbacks(boolean enabled) used to enable the activity lifecycle callbacks. Only available for Android 4.X and higher. This behavior is disabled by default.
  • Added a retry mechanism for downloading failed assets.
  • Cached impressions on soft bootups are invalidated if any shared assets are deleted.
Fixes:
  • Fixed issues causing “Could Not Delete Cache Entry for key” log message on startup.

Version 6.3.0 (Feb. 8, 2016)

Features & Improvements:
  • Upgrade now to get ready for the new Chartboost Video V2 experience, rolling out in Q1.
  • Older devices in the networking library no longer crash on occasion.
  • MoreApps rotation issue has been resolved.
  • Removed “Could Not Delete Cache Entry for key” notification from logs.

Version 6.2.0 (Jan. 13, 2016)

Features & Improvements:
  • New method getSDKVersion() returns the current version of the Chartboost SDK.
  • New method setShouldHideSystemUI(Boolean hide) hides or displays the Navigation and Notification bars for Chartboost ads.
  • setShouldRequestInterstitialsInFirstSession is no longer deprecated.
Fixes:
  • Improved handling of views when the app is minimized after clicking an ad.
  • Reduced network usage with more efficient handling of cached assets.

Version 6.1.0 (Nov. 19, 2015)

Features & Improvements:
  • Added didInitialize() delegate callback to notify that the SDK is initialized and ready to use
Fixes:
  • In Play Ads now properly trigger the failure delegate on failure in all cases
  • Restored support for Minimum Android API Level 9
  • Fixed a bug that caused null pointer exception crashes
  • Various bug fixes and stability improvements

Version 6.0.2 (Oct. 26, 2015)

Features & Improvements:
  • Video experience rebuilt from the ground up.
  • Android 6.0 Marshmallow support. Set the project’s Target SDK Version to API Level 23 in your AndroidManfiest.xml: android:targetSdkVersion="23"
Required to ensure compatibility with Android 6.0 devices:
  • Set the project’s Build SDK Version to API Level 23 in your build.gradle file: buildToolsVersion = '23.0.0'
  • Set the project’s Compile SDK Version to API Level 23 in your build.gradle file: compileSdkVersion = 23
Integration now requires the following entry in the AndroidManifest.xml file to display ads:
<activity android:name="com.chartboost.sdk.CBImpressionActivity"
               android:excludeFromRecents="true"
               android:hardwareAccelerated="true"
               android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
               android:configChanges="keyboardHidden|orientation|screenSize" />
  • android.permission.WRITE_EXTERNAL_STORAGE is now an optional (but recommended) permission instead of required.
  • New recommended permission android.permission.READ_PHONE_STATE allows the SDK to handle calls interrupting video playback during videos.
  • New method, public void didPauseClickForConfirmation(Activity activity), to handle Age Gate functionality. Previous method didPauseClickForConfirmation() is now deprecated.
  • Extending ChartboostActivity as a method of integration is deprecated. If you rely on this functionality please contact us.
Fixes:
  • Bug fixes and improvements.

Version 5.5.3 (Aug. 5, 2015)

Fixes:
  • Fixed a crash in the retry event system.

Version 5.5.0 (Jun. 29, 2015)

Features & Improvements:
  • Added a new method, public void setMediation(String libraryName, String version), to track mediation partner library versions.
Fixes:
  • We temporarily pulled v5.5.0 to address a crash bug when retrying events in airplane mode.
  • Age gate now properly blocks video ads between the didPauseClickForConfirmation call and the successful didPassAgeGate response.
  • Removed an unnecessary video prefetch call.
  • Fixed bug that caused Chartboost activity leaking in some cases.
  • Prevented MoreApps page loading screen from displaying before static interstitial and rewarded video ads.
  • Fixed bug in sample app included in SDK download package that prevented GAID from being sent to our servers.
  • Corrected time zone format in reporting from devices running Android OS version 4.1 and older.

Version 5.4.1 (Jun. 4, 2015)

Fixes:
  • Fixed bug that caused Chartboost media files to appear in the Gallery app.
  • android.permission.WRITE_EXTERNAL_STORAGE is now required.

Version 5.4.0 (Jun. 1, 2015)

Features & Improvements:
  • Added error logging for all network calls.
  • Chartboost can now determine which network type the device is using.
Fixes:
  • Fixed bug causing ads to disappear on rotation while using activities.
  • Rewarded video pre-roll screen now properly displays after home key input.
  • Fixed null pointer exception that occurred when initializing Chartboost and making calls on different threads.
  • Fixed rare bug that prevented video prefetching under certain circumstances.

Version 5.3.0 (May 7, 2015)

Features & Improvements:
  • Added a new method, public void setFrameworkVersion(String version), to track custom framework versions.
  • Added Weeby to available frameworks.

Version 5.2.0 (Apr. 6, 2015)

Features & Improvements:
  • Updated Amazon IAP library to v2.0.
Fixes:
  • Fixed bug preventing Android SDK from showing additional ads when setImpressionsUseActivities was enabled and previous ads were dismissed too quickly.
  • Resolved Chartboost Android SDK v5.1.3 bug that fired VIDEO_UNAVAILABLE error even when hasRewardedVideo returned true.
  • Fixed Chartboost Android SDK v5.1.3 bug that caused occasional crashes after interstitial views.
  • Fixed Chartboost Android SDK v5.1.1 bug that caused crashes when back button was pressed after interstitial views.
  • Resolved bug in Chartboost Android SDK v5.1.1 that caused occasional crashes on showInterstitial calls.
  • Removed all exceptions thrown from the SDK.
  • Fixed issue preventing /api/install calls on every bootup.
  • Fullscreen videos now properly extend to screen edges.

Version 5.1.3 (Mar. 17, 2015)

Fixes:
  • Fixed bug firing duplicate showInterstitial and showRewardedVideo calls in Unity-built Android games.

Version 5.1.2 (Mar. 11, 2015)

Features & Improvements:
  • Lorem ipsum
Fixes:
  • Fixed bug preventing didDismissInterstitial and didDismissRewardedVideo from firing.
  • Resolved issue preventing didCacheInterstitial from being called when ads were already cached at the location.

Version 5.1.1 (Feb. 23, 2015)

Features & Improvements:
  • Added support for full-screen videos.
  • Fixed DevKit engine issue preventing rewarded video playback after device returns from sleep.
  • Fixed bug causing video crashes on crash exception.
  • Resolved issue preventing clicks from dismissing rewarded/interstitial video ads.
  • Corrected video download button alignment.

Version 5.1.0 (Dec. 10, 2014)

Features & Improvements:
  • Fixed video interstitial NullPointerException crash in Android SDK 5.0.3.
  • Corrected/updated error code enums.
  • Fixed Unity v5.0 and v5.0.2 bug preventing MoreApps pages from loading.
  • Fixed bug preventing passing of custom_id callbacks parameter.
  • Fixed rare Rewarded Video bug that froze app if pre-roll popup was dismissed after player watched one video.

Version 5.0.4 (Nov. 7, 2014)

Features & Improvements:
  • Fixed bug preventing proper autocaching of ads.
  • Added new isAnyViewVisible() API that can be used to check if any Chartboost ads are visible.
  • Bug fixes and stability improvements for Video, static interstitials and InPlay.

Version 5.0.3 (Oct. 1, 2014)

Features & Improvements:
  • Fix video playback codec support for low end android devices.
  • willDisplayVideo delegate callback added when the video is about to be displayed both for rewarded and interstitial video.
  • Minor bug fixes and improvements.

Version 5.0.2 (Sep. 12, 2014)

Features & Improvements:
  • Fix for video where certain OEM devices video-completed calls were not sent out properly.
  • Minor bug fixes and patches.

Version 5.0.1 (Sep. 9, 2014)

Features & Improvements:
  • Fix for flickering issue for video on Android 2.3 devices on Native SDK.
  • Fix for Unity plugin error calling the onBackPressed Event from a non-UI Thread.
  • Fix for crash when using setImpressionsUseActivities().
  • Various bug fixes and stability improvements.

Version 5.0.0 (Sep. 4, 2014)

Features & Improvements:
  • Chartboost Video released.
  • All public methods are now static, so rather than using instance calls (e.g. this.cb) you can use the class name to call methods’ names (e.g. Chartboost.onCreate()).
  • SDK initialization API name and its parameters are changed.
  • ChartboostDelegate is not an interface anymore, but an abstract class. This means you don’t need to know ahead of time (or implement) the delegate callbacks that will be needed.
  • New activity callbacks, onPause() and onResume(), added.
  • Java API docs are provided along with SDK and a sample app (CBSample).

Version 4.1.2 (Aug. 20, 2014)

Features & Improvements:
  • Fixed crash related to null path checking.
  • Fixed an error related to linking Amazon in-app purchasing library.

Version 4.1.1 (Jun. 23, 2014)

Features & Improvements:
  • Fixed edge case crash when calling cacheInterstitial() early; this method should always be called after onStart().
  • Fixed crash while retrying request during network change.
  • Fixed crash when filesystem data unavailable.
  • Fixed tracking event overload on network failure.

Version 4.1.0 (Jun. 9, 2014)

Features & Improvements:
  • New product: Post-Install Analytics exposes in-app purchasing API for developers to track Google Play and Amazon Appstore in-app purchases. More information
  • New product: Tracking. This product is mainly used to log session events, user events, system events and debug events that are recorded by the SDK and sent to our servers.
  • Carrier information like carrier name, MCC, MNC, ISO and phone type is sent in every API request.
  • Permission android.permission.ACCESS_NETWORK_STATE is now required.
  • jb flag is sent on every request to determine if the device a jailbroken or rooted device.
  • New CBLocation constants (a default set of location constants which can be used during impression calls) provided to developers.
  • Ultra-fast networking library for asynchronous networking (Volley + OkHttp Square).
  • In app analytics, MoreApps page impressions now count toward total number of impressions.
  • All impression classes are now more structurally organized.
  • All impressions are grouped into their own packages.
  • File caching and network reachability is centralized across SDK use.
  • RequestManager module integrated with the new custom networking library for more reliable Chartboost API calls.
  • Some clickable elements in impressions now have a pressed effect to improve user experience
  • Deprecated methods (will be removed in the future releases):
    • startSession(): SDK will be internally handling and tracking the session calls.
    • clearImageCache(): Use clearCache() method, which performs the clearImageCache() operation internally.
    • setFramework(): Removed in the previous release, but restored as a deprecated method for the time being.

Version 4.0.1 (Apr. 22, 2014)

Features & Improvements:
  • Fixed crash due to Google Play Services security permission check.

Version 4.0.0 (Mar. 17, 2014) (requires Android OS v2.3+)

Features & Improvements:
  • Improved interstitial and MoreApps page animations; we recommend you target Android OS 4.0+ for best results.
  • Improved close button handling after device orientation changes.
  • Added age gate for ad links, accessible via a new shouldPauseClickForConfirmation() delegate method. Learn more
  • Fixed rare bug that served incorrect ad sizes.
  • Improved SDK organization: All Chartboost properties and settings are accessible/editable via a new CBPreferences class.
  • Added error constants that can be used to print delegate method failure reasons in log.
  • Renamed didFailToLoadUrl delegate method to didFailToRecordClick in order to more granularly describe event failures.
  • Added ability to configure logging for reports to Chartboost Support, accessible separate from the Chartboost instance via CBPreferences.setLoggingLevel(). Options are:
    • NONE: Nothing is logged.
    • INTEGRATION: The default setting — suspected integration errors will be logged (debug builds only).
    • ALL: Suspected integration errors, plus diagnostic errors and messages, will be logged (in debug and release builds).
  • Added client-side support for Google Play Services Advertising ID tracking.
  • CBAnalytics is no longer available.

Version 3.4.0 (Nov. 20, 2013)

Features & Improvements:
  • Now handles high-res interstitial assets!

Version 3.3.0 (Sep. 25, 2013)

Features & Improvements:
  • ChartboostActivity and ChartboostNativeActivity are simple alternatives to implementing Chartboost in your app. Simply extend your activities from either class (depending on whether you use native activities or not), provide the app ID and signature, and you’re done!
  • Changed documentation to suggest calling Chartboost.startSession() and cb.showInterstitial(); in your activity’s onStart() method, instead of in onCreate().
  • ChartboostDefaultDelegate is a new abstract class that serves as a ChartboostDelegate. Extending from this instead will allow you to skip overriding the methods you are not interested in, at the expense of not being able to inherit from your own base class. The default implementation returns true for any method that returns a boolean in the delegate.
  • didFailToLoadUrl() is called when the result of a click in an impression fails to load.
  • Added exceptions to warn you if you have forgotten to properly exclude Chartboost from your proguard using the line -keep class com.chartboost.sdk.** { *; }
  • Simultaneous identical interstitial or MoreApps request attempts will fail immediately. However, simultaneous interstitial requests with different locations are fine.
  • Fix allowing Chartboost servers to differentiate buggy Android 2.x devices that all share the same ANDROID_ID
  • Fixed an infrequent HTTP connection error during image downloads.
  • Fixed bug where if the network is lost while viewing the MoreApps page, a click would cause a progress bar to hang forever.
  • Fixed edge case crashes related to caching images.
  • Method Chartboost.orientation() is now called getOrientation()
  • Added ability to disable animations and fixed animation type none
  • Fixed memory leak that could sometimes occur with the activity impressions setting.
  • Removed dependence of sensor listener unless orientation is overridden.
  • Removed all dependencies on AsyncTask, ensuring full compatibility with multithreaded apps.
  • Fixed bug where screen stayed dark after closing interstitials on certain problem devices (including 4.1.2 Nexus S and Nexus 10).
  • Fixed interference with game-rate sensor listeners on certain problem devices (including 2.3.x Galaxy S1 and Galaxy S2).
  • Fixed crash when cacheInterstitial() was called off the UI thread.
  • Change: Show impression calls will immediately fail (and call delegate method) if an impression is already visible.
  • Stopped delegate method shouldDisplayLoadingViewForMoreApps() from being fired when showing interstitials.
  • Fixed delegate method shouldRequestMoreApps() was not being called as specified.
  • Fixed harmless Lint error about invalid package reference (also no longer necessary to include -dontwarn java.lang.management.** in your proguard configuration).
  • Fixed memory leak involved in using Chartboost in multiple subsequent activities.
  • Fail gracefully in low memory situations.
  • Added ability to suppress off-thread method calling exceptions for certain unusual use cases.

Version 3.1.5 (Feb. 13, 2013)

Features & Improvements:
  • Library javadoc now included!
  • Add chartboost.jar.properties and doc directory to libs
  • Adds support for campaign targeting by language.
  • Significant memory management improvements.
  • SDK no longer retains an activity reference, be sure to implement cb.onDestroy() in your activity’s onDestroy() method.
  • Improved stability when WiFi connected without internet connectivity
  • Interstitials now work in the Android emulator.
  • Removed deprecated methods, see documentation or the example project.
  • Added descriptive exceptions to occur in certain wrong implementation scenarios.
  • Now compatible with NativeActivity and other edge case scenarios.
  • Safer and more efficient image loading.
  • Fixed showMoreApps() when delegate is null.
  • Variety of stability and compatibility improvements.
  • Improved reliability when using proguard. Be sure to add the following to your proguard.cfg: -keep class com.chartboost.** { *; } -dontwarn java.lang.management.**

Version 3.1.3 (Dec. 14, 2012)

Features & Improvements:
  • Fixes language bug to improve stability for Asian languages.
  • Fixes rare http request: null error on certain devices.

Version 3.1.0 (Nov. 20, 2012)

Features & Improvements:
  • SDK is now an Interface instead of a Class.
  • New native interstitials: faster, less memory.
  • New native More-Apps page: faster, less memory, less network activity.
  • Asset caching: individual assets are cached & only downloaded if they don’t exist in cache.
  • Cache expiration: cached interstitials automatically expire after 24 hours.
  • Multi orientation support: if your app works in both orientations, simply select both (landscape and portrait) in the dashboard.
  • No longer uses an activity to display the view (better performance).
  • Handles tracking of cached interstitials properly.
  • Countless performance & stability upgrades.
  • New API method: cb.onCreate initializes Chartboost with cb.onCreate(Context, appID, appSignature, chartboostDelegate or null)
  • New API method: cb.startSession(), removed cb.install()
  • New delegate method: didCacheInterstitial called when an interstitial is successfully cached from the server, interstitial location identifier passed in.
  • New delegate method: didCacheMoreApps called when the MoreApps page is successfully cached from the server.
  • New delegate method: shouldRequestInterstitialsInFirstSession default is YES, you may override to NO if you don’t want interstitials displayed until after the 2nd startSession (for compliance with Human Interface Guidelines).