Android SDK 8.x Upgrade

Key Update Steps
Chartboost SDK Release 8.0.2 brings changes to public API and integration specifications.
Changes
Removed from public api:
  • Chartboost.onCreate(Activity);
  • Chartboost.onResume(Activity);
  • Chartboost.onPause(Activity);
  • Chartboost.onStop(Activity);
  • Chartboost.onDestroy(Activity);
1.startWithAppId
 
startWithAppId doesn’t require Activity anymore. From version 8.0.1+ context should be passed instead.
public​ ​static​ void​ startWithAppId(Activity activity, ​String​ appId, ​String appSignature)
replaced by:
public​ ​static​ ​void​ startWithAppId(Context context, ​String​ appId, ​String appSignature)
2.setMediation
 
Set mediation has an extra field called adapter version:
public​ ​static​ ​void​ setMediation(​final​ CBMediation mediation, ​final​ ​String libraryVersion)
replaced by:
public​ ​static​ ​void​ setMediation(​final​ CBMediation mediation, ​final​ ​String libraryVersion, ​final​ S​tring​ adapterVersion)
3.Chartboost.setActivityAttrs(this);
 
Is not required anymore. Fullscreen is applied dynamically to the Ad activity.
 
4.Chartboost.setActivityCallbacks(false)
 
Is not required anymore. Callbacks are handled now internally.
Integration
Basic integration could look like this:
Chartboost​.setPIDataUseConsent​(​context​,Chartboost​.CBPIDataUseConsent.YES_BEHAVIORAL​)
Chartboost​.startWithAppId​(c​ontext​, a​ppId​, ​appSignature​)
Chartboost​.setLoggingLevel​(​CBLogging​.Level.ALL​) 
Chartboost​.setDelegate​(​delegate​)
cache:
Chartboost​.cacheInterstitial​(​location​)
show:
Chartboost​.showInterstitial​(​location​)
Distribution
Add to your gradle file:
repositories​ {
​    maven​ { ​url​ ​"https://chartboostmobile.bintray.com/Chartboost"​ }
}
dependencies {
    implementation​ ​'com.chartboost:chartboost-sdk:8.0.2'
}