Skip to content

Commit

Permalink
Applied AD_VIEWABLE as the impression tracking method. (#6)
Browse files Browse the repository at this point in the history
* Applied AD_VIEWABLE as the impression tracking method.

* Updated CHANGELOG

* CHANGELOG adjustment.
  • Loading branch information
cb-jpadilla authored Oct 19, 2023
1 parent 99570bf commit feabc22
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.2.17.0.2
- Banner impressions are now tracked on ad show using ImpressionTrackingMethod.AD_VIEWABLE.

### 4.2.17.0.1
- Updated to handle recent AdFormat changes.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The Chartboost Mediation Verve adapter mediates HyBid via the Chartboost Mediati

In your `build.gradle`, add the following entry:
```
implementation "com.chartboost:chartboost-mediation-adapter-verve:4.2.17.0.1"
implementation "com.chartboost:chartboost-mediation-adapter-verve:4.2.17.0.2"
```

## Contributions
Expand Down
2 changes: 1 addition & 1 deletion VerveAdapter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,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.2.17.0.1"
android.defaultConfig.versionName = System.getenv("VERSION_OVERRIDE") ?: "4.2.17.0.2"
buildConfigField("String", "CHARTBOOST_MEDIATION_VERVE_ADAPTER_VERSION", "\"${android.defaultConfig.versionName}\"")

consumerProguardFiles("proguard-rules.pro")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import net.pubnative.lite.sdk.HyBidError
import net.pubnative.lite.sdk.HyBidErrorCode
import net.pubnative.lite.sdk.interstitial.HyBidInterstitialAd
import net.pubnative.lite.sdk.models.AdSize
import net.pubnative.lite.sdk.models.ImpressionTrackingMethod
import net.pubnative.lite.sdk.rewarded.HyBidRewardedAd
import net.pubnative.lite.sdk.utils.Logger
import net.pubnative.lite.sdk.views.HyBidAdView
Expand Down Expand Up @@ -359,8 +360,10 @@ class VerveAdapter : PartnerAdapter {
listener: PartnerAdListener
): Result<PartnerAd> {
return suspendCancellableCoroutine { continuation ->
val hyBidAdView = HyBidAdView(context)
hyBidAdView.setAdSize(getHyBidAdSize(request.size))
val hyBidAdView = HyBidAdView(context).apply {
setAdSize(getHyBidAdSize(request.size))
setTrackingMethod(ImpressionTrackingMethod.AD_VIEWABLE)
}
val hyBidAdViewListener = object : HyBidAdView.Listener {
val partnerAd = PartnerAd(
ad = hyBidAdView,
Expand Down

0 comments on commit feabc22

Please sign in to comment.