diff --git a/CHANGELOG.md b/CHANGELOG.md index 8842f7a..0ec4126 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ Note the first digit of every adapter version corresponds to the major version of the Chartboost Mediation SDK compatible with that adapter. Adapters are compatible with any Chartboost Mediation SDK version within that major version. +### 4.6.12.1.6 +- Updated to handle recent AdFormat changes. + ### 4.6.12.1.5 - Guard against multiple continuation resumes during ad load and show. diff --git a/README.md b/README.md index f8460e2..4495183 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ The Chartboost Mediation Vungle adapter mediates Vungle via the Chartboost Media In your `build.gradle`, add the following entry: ``` - implementation "com.chartboost:chartboost-mediation-adapter-vungle:4.6.12.1.5" + implementation "com.chartboost:chartboost-mediation-adapter-vungle:4.6.12.1.6" ``` ## Contributions diff --git a/VungleAdapter/build.gradle.kts b/VungleAdapter/build.gradle.kts index 7eee271..ae37f93 100644 --- a/VungleAdapter/build.gradle.kts +++ b/VungleAdapter/build.gradle.kts @@ -35,7 +35,7 @@ android { minSdk = 21 targetSdk = 33 // If you touch the following line, don't forget to update scripts/get_rc_version.zsh - android.defaultConfig.versionName = System.getenv("VERSION_OVERRIDE") ?: "4.6.12.1.5" + android.defaultConfig.versionName = System.getenv("VERSION_OVERRIDE") ?: "4.6.12.1.6" buildConfigField("String", "CHARTBOOST_MEDIATION_VUNGLE_ADAPTER_VERSION", "\"${android.defaultConfig.versionName}\"") consumerProguardFiles("proguard-rules.pro") diff --git a/VungleAdapter/src/main/java/com/chartboost/mediation/vungleadapter/VungleAdapter.kt b/VungleAdapter/src/main/java/com/chartboost/mediation/vungleadapter/VungleAdapter.kt index f33b1e9..b1eb220 100644 --- a/VungleAdapter/src/main/java/com/chartboost/mediation/vungleadapter/VungleAdapter.kt +++ b/VungleAdapter/src/main/java/com/chartboost/mediation/vungleadapter/VungleAdapter.kt @@ -365,11 +365,11 @@ class VungleAdapter : PartnerAdapter { ): Result { PartnerLogController.log(LOAD_STARTED) - return when (request.format) { - AdFormat.BANNER -> { + return when (request.format.key) { + AdFormat.BANNER.key, "adaptive_banner" -> { loadBannerAd(request, partnerAdListener) } - AdFormat.INTERSTITIAL, AdFormat.REWARDED -> { + AdFormat.INTERSTITIAL.key, AdFormat.REWARDED.key -> { loadFullscreenAd(request, partnerAdListener) } else -> { @@ -396,13 +396,13 @@ class VungleAdapter : PartnerAdapter { val listener = listeners.remove(partnerAd.request.identifier) - return when (partnerAd.request.format) { + return when (partnerAd.request.format.key) { // Banner ads do not have a separate "show" mechanism. - AdFormat.BANNER -> { + AdFormat.BANNER.key, "adaptive_banner" -> { PartnerLogController.log(SHOW_SUCCEEDED) Result.success(partnerAd) } - AdFormat.INTERSTITIAL, AdFormat.REWARDED -> showFullscreenAd( + AdFormat.INTERSTITIAL.key, AdFormat.REWARDED.key -> showFullscreenAd( partnerAd, listener ) @@ -430,13 +430,13 @@ class VungleAdapter : PartnerAdapter { listeners.remove(partnerAd.request.identifier) adms.remove(partnerAd.request.partnerPlacement) - return when (partnerAd.request.format) { + return when (partnerAd.request.format.key) { /** * Only invalidate banner ads. * For fullscreen ads, since Vungle does not provide an ad in the load callback, we don't * have an ad in PartnerAd to invalidate. */ - AdFormat.BANNER -> destroyBannerAd(partnerAd) + AdFormat.BANNER.key, "adaptive_banner" -> destroyBannerAd(partnerAd) else -> { PartnerLogController.log(INVALIDATE_SUCCEEDED) Result.success(partnerAd)