Skip to content

Commit 6e97543

Browse files
Mobile Ads Developer Relationscopybara-github
authored andcommitted
Updates the Verve Android adapter to version 3.7.1.0.
PiperOrigin-RevId: 842395679
1 parent bef35fb commit 6e97543

File tree

3 files changed

+30
-6
lines changed

3 files changed

+30
-6
lines changed

ThirdPartyAdapters/verve/verve/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ext {
1212
// String property to store the proper name of the mediation network adapter.
1313
adapterName = "Verve"
1414
// String property to store version name.
15-
stringVersion = "3.3.0.0"
15+
stringVersion = "3.7.1.0"
1616
// String property to store group id.
1717
stringGroupId = "com.google.ads.mediation"
1818
// Jacoco version to generate code coverage data
@@ -26,7 +26,7 @@ android {
2626
defaultConfig {
2727
minSdk 23
2828
targetSdk 33
29-
versionCode 3030000
29+
versionCode 3070100
3030
versionName stringVersion
3131
multiDexEnabled true
3232
buildConfigField('String', 'ADAPTER_VERSION', "\"${stringVersion}\"")
@@ -127,8 +127,8 @@ task jacocoTestReport(type: JacocoReport,
127127

128128
dependencies {
129129
implementation 'androidx.core:core-ktx:1.13.1'
130-
implementation 'com.google.android.gms:play-services-ads:24.7.0'
131-
implementation 'net.pubnative:hybid.sdk:3.7.0'
130+
implementation 'com.google.android.gms:play-services-ads:24.8.0'
131+
implementation 'net.pubnative:hybid.sdk:3.7.1'
132132

133133
testImplementation 'androidx.test:core:1.6.1'
134134
testImplementation 'androidx.test.espresso:espresso-core:3.6.1'

ThirdPartyAdapters/verve/verve/src/main/kotlin/com/google/ads/mediation/verve/VerveNativeAd.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ internal constructor(
4848
private var nativeAdCallback: MediationNativeAdCallback? = null
4949

5050
fun loadAd() {
51+
hyBidNativeAdRequest.setPreLoadMediaAssets(true)
5152
hyBidNativeAdRequest.prepareAd(bidResponse, this)
5253
}
5354

@@ -98,6 +99,10 @@ internal constructor(
9899
hyBidNativeAd?.stopTracking()
99100
}
100101

102+
override fun handleClick(view: View) {
103+
hyBidNativeAd?.onNativeClick(view)
104+
}
105+
101106
private fun mapNativeAd(nativeAd: NativeAd) {
102107
headline = nativeAd.title
103108
body = nativeAd.description
@@ -110,7 +115,7 @@ internal constructor(
110115
imageView.setImageBitmap(nativeAd.bannerBitmap)
111116
setMediaView(imageView)
112117

113-
overrideClickHandling = true
118+
overrideClickHandling = false
114119
overrideImpressionRecording = true
115120
}
116121

ThirdPartyAdapters/verve/verve/src/test/kotlin/com/google/ads/mediation/verve/VerveNativeAdTest.kt

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class VerveNativeAdTest {
6363
fun loadAd_invokesHyBidLoadAd() {
6464
verveNativeAd.loadAd()
6565

66+
verify(mockHyBidNativeAdRequest).setPreLoadMediaAssets(eq(true))
6667
verify(mockHyBidNativeAdRequest).prepareAd(eq(TEST_BID_RESPONSE), eq(verveNativeAd))
6768
}
6869

@@ -78,7 +79,7 @@ class VerveNativeAdTest {
7879
assertThat(verveNativeAd.starRating).isEqualTo(TEST_RATING.toDouble())
7980
assertThat(verveNativeAd.icon.drawable).isNotNull()
8081
assertThat(verveNativeAd.icon.uri.toString()).isEqualTo(TEST_ICON_URL)
81-
assertThat(verveNativeAd.overrideClickHandling).isTrue()
82+
assertThat(verveNativeAd.overrideClickHandling).isFalse()
8283
}
8384

8485
@Test
@@ -139,6 +140,24 @@ class VerveNativeAdTest {
139140
verify(mockHyBidNativeAd).startTracking(eq(testView), eq(verveNativeAd))
140141
}
141142

143+
@Test
144+
fun unTrackViews_invokesStopTracking() {
145+
verveNativeAd.onRequestSuccess(mockHyBidNativeAd)
146+
147+
verveNativeAd.untrackView(testView)
148+
149+
verify(mockHyBidNativeAd).stopTracking()
150+
}
151+
152+
@Test
153+
fun handleClick_invokesOnNativeClick() {
154+
verveNativeAd.onRequestSuccess(mockHyBidNativeAd)
155+
156+
verveNativeAd.handleClick(testView)
157+
158+
verify(mockHyBidNativeAd).onNativeClick(testView)
159+
}
160+
142161
private companion object {
143162
const val TEST_TITLE = "testTitle"
144163
const val TEST_DESCRIPTION = "testDescription"

0 commit comments

Comments
 (0)