Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ThirdPartyAdapters/dtexchange/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Built and tested with:

#### Version 8.4.0.0
- Removed class-level references to Context. Can help reduce memory leak issues.
- Added watermark on bidding ads.
- Verified compatibility with DT Exchange SDK 8.4.0.

Built and tested with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ class DTExchangeBannerAd(
adSpot.setRequestListener(this)
controller.eventsListener = this
FyberAdapterUtils.updateFyberExtraParams(mediationBannerAdConfiguration.mediationExtras)
adSpot.loadAd(bidResponse)
val watermark = mediationBannerAdConfiguration.watermark
adSpot.loadAd(bidResponse, watermark)
}

override fun onInneractiveSuccessfulAdRequest(iAdSpot: InneractiveAdSpot?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ class DTExchangeInterstitialAd(
adSpot.setRequestListener(this)
controller.eventsListener = this
FyberAdapterUtils.updateFyberExtraParams(mediationInterstitialAdConfiguration.mediationExtras)
adSpot.loadAd(bidResponse)
val watermark = mediationInterstitialAdConfiguration.watermark
adSpot.loadAd(bidResponse, watermark)
}

override fun showAd(context: Context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ void loadWaterfallAd(MediationRewardedAdConfiguration adConfiguration) {
void loadRtbAd(MediationRewardedAdConfiguration adConfiguration) {
String bidResponse = adConfiguration.getBidResponse();
initializeFyberClasses(adConfiguration);
rewardedSpot.loadAd(bidResponse);
String watermark = adConfiguration.getWatermark();
rewardedSpot.loadAd(bidResponse, watermark);
}

private void initializeFyberClasses(MediationRewardedAdConfiguration adConfiguration) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.fyber.inneractive.sdk.external.InneractiveAdViewUnitController
import com.fyber.inneractive.sdk.external.InneractiveErrorCode
import com.google.ads.mediation.adaptertestkit.AdErrorMatcher
import com.google.ads.mediation.adaptertestkit.AdapterTestKitConstants.TEST_BID_RESPONSE
import com.google.ads.mediation.adaptertestkit.AdapterTestKitConstants.TEST_WATERMARK
import com.google.ads.mediation.adaptertestkit.createMediationBannerAdConfiguration
import com.google.android.gms.ads.AdError
import com.google.android.gms.ads.mediation.MediationAdLoadCallback
Expand Down Expand Up @@ -45,7 +46,13 @@ class DTExchangeBannerAdTest {

@Before
fun setUp() {
dtExchangeBannerAd = DTExchangeBannerAd(mockAdLoadCallback)
val adConfiguration =
createMediationBannerAdConfiguration(
context = context,
bidResponse = TEST_BID_RESPONSE,
watermark = TEST_WATERMARK,
)
dtExchangeBannerAd = DTExchangeBannerAd(adConfiguration, mockAdLoadCallback)
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import com.fyber.inneractive.sdk.external.OnFyberMarketplaceInitializedListener.
import com.google.ads.mediation.adaptertestkit.AdErrorMatcher
import com.google.ads.mediation.adaptertestkit.AdapterTestKitConstants
import com.google.ads.mediation.adaptertestkit.AdapterTestKitConstants.TEST_BID_RESPONSE
import com.google.ads.mediation.adaptertestkit.AdapterTestKitConstants.TEST_WATERMARK
import com.google.ads.mediation.adaptertestkit.assertGetSdkVersion
import com.google.ads.mediation.adaptertestkit.assertGetVersionInfo
import com.google.ads.mediation.adaptertestkit.createMediationBannerAdConfiguration
Expand Down Expand Up @@ -311,7 +312,11 @@ class FyberMediationAdapterTest {
fun loadRtbBannerAd_invokesLoadAd() {
mockStatic(InneractiveAdSpotManager::class.java).use {
val bannerAdConfiguration =
createMediationBannerAdConfiguration(context = activity, bidResponse = TEST_BID_RESPONSE)
createMediationBannerAdConfiguration(
context = activity,
bidResponse = TEST_BID_RESPONSE,
watermark = TEST_WATERMARK,
)
val mockAdSpot = mock<InneractiveAdSpot>()
val mockInneractiveAdSpotManager =
mock<InneractiveAdSpotManager> { on { createSpot() } doReturn mockAdSpot }
Expand All @@ -323,7 +328,7 @@ class FyberMediationAdapterTest {
InneractiveAdManager.setMediationName(eq(FyberMediationAdapter.MEDIATOR_NAME))
InneractiveAdManager.setMediationVersion(eq(MobileAds.getVersion().toString()))
}
verify(mockAdSpot).loadAd(eq(TEST_BID_RESPONSE))
verify(mockAdSpot).loadAd(eq(TEST_BID_RESPONSE), eq(TEST_WATERMARK))
}
}

Expand All @@ -337,6 +342,7 @@ class FyberMediationAdapterTest {
createMediationInterstitialAdConfiguration(
context = activity,
bidResponse = TEST_BID_RESPONSE,
watermark = TEST_WATERMARK,
)
val mockAdSpot = mock<InneractiveAdSpot>()
val mockInneractiveAdSpotManager =
Expand All @@ -349,7 +355,7 @@ class FyberMediationAdapterTest {
InneractiveAdManager.setMediationName(eq(FyberMediationAdapter.MEDIATOR_NAME))
InneractiveAdManager.setMediationVersion(eq(MobileAds.getVersion().toString()))
}
verify(mockAdSpot).loadAd(eq(TEST_BID_RESPONSE))
verify(mockAdSpot).loadAd(eq(TEST_BID_RESPONSE), eq(TEST_WATERMARK))
}
}

Expand Down Expand Up @@ -439,7 +445,11 @@ class FyberMediationAdapterTest {
fun loadRtbRewardedAd_invokesLoadAd() {
mockStatic(InneractiveAdSpotManager::class.java).use {
val rewardedAdParameters =
createMediationRewardedAdConfiguration(context = activity, bidResponse = TEST_BID_RESPONSE)
createMediationRewardedAdConfiguration(
context = activity,
bidResponse = TEST_BID_RESPONSE,
watermark = TEST_WATERMARK,
)
val mockAdSpot = mock<InneractiveAdSpot>()
val mockInneractiveAdSpotManager =
mock<InneractiveAdSpotManager> { on { createSpot() } doReturn mockAdSpot }
Expand All @@ -451,7 +461,7 @@ class FyberMediationAdapterTest {
InneractiveAdManager.setMediationName(eq(FyberMediationAdapter.MEDIATOR_NAME))
InneractiveAdManager.setMediationVersion(eq(MobileAds.getVersion().toString()))
}
verify(mockAdSpot).loadAd(eq(TEST_BID_RESPONSE))
verify(mockAdSpot).loadAd(eq(TEST_BID_RESPONSE), eq(TEST_WATERMARK))
}
}

Expand Down
Loading