Skip to content

Commit

Permalink
Release 2.0.9 (#602)
Browse files Browse the repository at this point in the history
* feat: increment release version

* fix: replace old config ids

* fix: multiformat examples

* fix: admob banner 300x250
  • Loading branch information
ValentinPostindustria authored Mar 16, 2023
1 parent cd3da32 commit 03ea2c8
Show file tree
Hide file tree
Showing 14 changed files with 58 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,26 @@ import android.os.Bundle
import org.prebid.mobile.admob.AdMobMediationInterstitialUtils
import org.prebid.mobile.api.data.AdUnitFormat
import org.prebid.mobile.api.mediation.MediationInterstitialAdUnit
import org.prebid.mobile.renderingtestapp.R
import java.util.*

open class AdMobInterstitialMultiformatFragment : AdMobInterstitialFragment() {

override fun initAd(): Any? {
val context = requireContext()

extras = Bundle()
val mediationUtils = AdMobMediationInterstitialUtils(extras)
val adUnitFormats = EnumSet.of(AdUnitFormat.DISPLAY, AdUnitFormat.VIDEO)
adUnit = MediationInterstitialAdUnit(activity, configId, adUnitFormats, mediationUtils)
adUnit = MediationInterstitialAdUnit(
activity,
listOf(
context.getString(R.string.imp_prebid_id_interstitial_320_480),
context.getString(R.string.imp_prebid_id_video_interstitial_320_480)
).shuffled().first(),
adUnitFormats,
mediationUtils
)
adUnit?.setMinSizePercentage(30, 30)
return adUnit
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,32 @@ import org.prebid.mobile.AdSize
import org.prebid.mobile.api.data.AdUnitFormat
import org.prebid.mobile.api.rendering.InterstitialAdUnit
import org.prebid.mobile.eventhandlers.GamInterstitialEventHandler
import org.prebid.mobile.renderingtestapp.R
import org.prebid.mobile.renderingtestapp.plugplay.bidding.base.BaseBidInterstitialFragment
import java.util.*

open class GamInterstitialMultiformatFragment : BaseBidInterstitialFragment() {

override fun initInterstitialAd(
adUnitFormat: AdUnitFormat,
adUnitId: String?,
configId: String?,
width: Int,
height: Int
) {
val context = requireContext()
val interstitialEventHandler = GamInterstitialEventHandler(requireActivity(), adUnitId)
interstitialAdUnit = InterstitialAdUnit(
requireContext(),
configId,
listOf(
context.getString(R.string.imp_prebid_id_interstitial_320_480),
context.getString(R.string.imp_prebid_id_video_interstitial_320_480)
).shuffled().first(),
EnumSet.of(AdUnitFormat.DISPLAY, AdUnitFormat.VIDEO),
interstitialEventHandler
)
interstitialAdUnit?.setInterstitialAdUnitListener(this)
interstitialAdUnit?.setMinSizePercentage(AdSize(30, 30))
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.applovin.mediation.adapters.prebid.utils.MaxMediationInterstitialUtil
import com.applovin.mediation.ads.MaxInterstitialAd
import org.prebid.mobile.api.data.AdUnitFormat
import org.prebid.mobile.api.mediation.MediationInterstitialAdUnit
import org.prebid.mobile.renderingtestapp.R
import java.util.*

class MaxInterstitialFragmentMultiformat : MaxInterstitialFragment() {
Expand All @@ -12,13 +13,17 @@ class MaxInterstitialFragmentMultiformat : MaxInterstitialFragment() {
maxInterstitialAd = MaxInterstitialAd(adUnitId, activity)
maxInterstitialAd?.setListener(createListener())

val context = requireContext()
val mediationUtils =
MaxMediationInterstitialUtils(
maxInterstitialAd
)
adUnit = MediationInterstitialAdUnit(
activity,
configId,
listOf(
context.getString(R.string.imp_prebid_id_interstitial_320_480),
context.getString(R.string.imp_prebid_id_video_interstitial_320_480)
).shuffled().first(),
EnumSet.of(AdUnitFormat.DISPLAY, AdUnitFormat.VIDEO),
mediationUtils
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,26 @@ package org.prebid.mobile.renderingtestapp.plugplay.bidding.ppm
import org.prebid.mobile.AdSize
import org.prebid.mobile.api.data.AdUnitFormat
import org.prebid.mobile.api.rendering.InterstitialAdUnit
import org.prebid.mobile.renderingtestapp.R
import org.prebid.mobile.renderingtestapp.plugplay.bidding.base.BaseBidInterstitialFragment
import java.util.*

open class PpmInterstitialMultiformatFragment : BaseBidInterstitialFragment() {

override fun initInterstitialAd(
adUnitFormat: AdUnitFormat, adUnitId: String?,
configId: String?, width: Int, height: Int
) {
val context = requireContext()
interstitialAdUnit =
InterstitialAdUnit(requireContext(), configId, EnumSet.of(AdUnitFormat.DISPLAY, AdUnitFormat.VIDEO))
InterstitialAdUnit(
requireContext(),
listOf(
context.getString(R.string.imp_prebid_id_interstitial_320_480),
context.getString(R.string.imp_prebid_id_video_interstitial_320_480)
).shuffled().first(),
EnumSet.of(AdUnitFormat.DISPLAY, AdUnitFormat.VIDEO)
)
interstitialAdUnit?.setInterstitialAdUnitListener(this)
interstitialAdUnit?.setMinSizePercentage(AdSize(30, 30))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ class DemoItemProvider private constructor() {
ppmInterstitialMultiformatAction,
ppmInterstitialTagList,
createBannerBundle(
R.string.imp_prebid_id_video_interstitial_320_480_random,
R.string.imp_prebid_dynamic,
null,
MIN_WIDTH_PERC,
MIN_HEIGHT_PERC
Expand Down Expand Up @@ -1216,7 +1216,7 @@ class DemoItemProvider private constructor() {
gamInterstitialMultiformatAction,
gamVideoTagList,
createBannerBundle(
R.string.imp_prebid_id_video_interstitial_320_480_random,
R.string.imp_prebid_dynamic,
R.string.adunit_gam_interstitial_video_320_480_app_event,
MIN_WIDTH_PERC,
MIN_HEIGHT_PERC
Expand Down Expand Up @@ -1462,7 +1462,7 @@ class DemoItemProvider private constructor() {
adMobBannerAction,
adMobBannerTagList,
createBannerBundle(
R.string.imp_prebid_id_banner_320x50_high_price,
R.string.imp_prebid_id_banner_320x50,
R.string.admob_banner_bidding_ad_unit_id_adapter,
320, 50
)
Expand Down Expand Up @@ -1498,7 +1498,7 @@ class DemoItemProvider private constructor() {
adMobRandomBannerAction,
adMobBannerTagList,
createBannerBundle(
R.string.imp_prebid_id_banner_320x50_high_price,
R.string.imp_prebid_id_banner_320x50,
R.string.admob_banner_bidding_ad_unit_id_adapter,
320, 50
)
Expand All @@ -1510,7 +1510,7 @@ class DemoItemProvider private constructor() {
adMobBannerAction,
adMobBannerTagList,
createBannerBundle(
R.string.imp_prebid_id_banner_320x50_high_price,
R.string.imp_prebid_id_banner_320x50,
R.string.admob_banner_bidding_ad_unit_id_adapter,
320, 50
).apply {
Expand All @@ -1527,7 +1527,7 @@ class DemoItemProvider private constructor() {
adMobBannerAction,
adMobBannerTagList,
createBannerBundle(
R.string.imp_prebid_id_banner_300x250_high_price,
R.string.imp_prebid_id_banner_300x250,
R.string.admob_banner_bidding_ad_unit_id_adapter,
300, 250
)
Expand Down Expand Up @@ -1627,7 +1627,7 @@ class DemoItemProvider private constructor() {
adMobInterstitialMultiformatAction,
adMobVideoTagList,
createBannerBundle(
R.string.imp_prebid_id_video_interstitial_320_480_random,
R.string.imp_prebid_dynamic,
R.string.admob_interstitial_bidding_ad_unit_id_adapter,
320, 480
)
Expand Down Expand Up @@ -1979,7 +1979,7 @@ class DemoItemProvider private constructor() {
maxMultiformatInterstitialAction,
maxVideoInterstitialTagList,
createBannerBundle(
R.string.imp_prebid_id_video_interstitial_320_480_random,
R.string.imp_prebid_dynamic,
R.string.max_interstitial_ad_unit_id,
320, 480
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@
app:popUpTo="@+id/headerBiddingFragment" />
<action
android:id="@+id/action_header_bidding_to_admob_interstitial_multiformat"
app:destination="@+id/navigation_admob_interstitial"
app:destination="@+id/navigation_admob_interstitial_multiformat"
app:enterAnim="@anim/nav_default_enter_anim"
app:exitAnim="@anim/nav_default_exit_anim"
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,23 +323,21 @@
<string name="prebid_config_id_qa_native_styles">51fe68ba-aff2-401e-9e15-f3ed89d5c036</string>

<string name="imp_prebid_id_banner_320x50">imp-prebid-banner-320-50</string>
<string name="imp_prebid_id_banner_320x50_high_price">imp-prebid-banner-320-50-high-price</string>
<string name="imp_prebid_id_banner_320x50_deeplink">imp-prebid-banner-deeplink</string>
<string name="imp_prebid_id_banner_320x50_vast">imp-prebid-banner-incorrect-vast</string>
<string name="imp_prebid_id_banner_300x250">imp-prebid-banner-300-250</string>
<string name="adimp_prebid_id_banner_300x250">imp-prebid-banner-300-250</string>
<string name="imp_prebid_id_banner_300x250_high_price">imp-prebid-banner-300-250-high-price</string>
<string name="imp_prebid_id_banner_728x90">imp-prebid-banner-728-90</string>
<string name="imp_prebid_id_banner_multisize">imp-prebid-banner-multisize</string>
<string name="imp_prebid_id_interstitial_320_480">imp-prebid-display-interstitial-320-480</string>

<string name="imp_prebid_dynamic">Imp id set in another place</string>
<string name="imp_prebid_id_video_outstream">imp-prebid-video-outstream</string>
<string name="imp_prebid_id_video_outstream_original_api">imp-prebid-video-outstream-original-api</string>
<string name="imp_prebid_id_video_instream">1001-1</string>
<string name="imp_prebid_id_video_outstream_end_card">imp-prebid-video-outstream-with-end-card</string>
<string name="imp_prebid_id_video_interstitial_320_480">imp-prebid-video-interstitial-320-480</string>
<string name="imp_prebid_id_video_interstitial_320_480_with_ad_configuration">imp-prebid-video-interstitial-320-480-with-ad-configuration</string>
<string name="imp_prebid_id_video_interstitial_320_480_random">imp-prebid-video-interstitial-320-480-random</string>
<string name="imp_prebid_id_video_interstitial_320_480_original_api">imp-prebid-video-interstitial-320-480-original-api</string>
<string name="imp_prebid_id_video_interstitial_320_480_with_end_card">imp-prebid-video-interstitial-320-480-with-end-card</string>
<string name="imp_prebid_id_video_interstitial_320_480_with_end_card_with_ad_configuration">imp-prebid-video-interstitial-320-480-with-end-card-with-ad-configuration</string>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To work with Prebid Mobile, you will need access to a Prebid Server. See [this p
Easily include the Prebid Mobile SDK using Maven. Simply add this line to your gradle dependencies:

```
implementation 'org.prebid:prebid-mobile-sdk:2.0.8'
implementation 'org.prebid:prebid-mobile-sdk:2.0.9'
```

## Build from source
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ext {
prebidSdkVersionName = "2.0.8"
prebidSdkVersionName = "2.0.9"
prebidSdkMinVersion = 16
prebidSdkTargetVersion = 32
prebidSdkCompileVersion = 32
Expand Down
4 changes: 2 additions & 2 deletions scripts/Maven/PrebidMobile-admobAdapters-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.prebid</groupId>
<artifactId>prebid-mobile-sdk-admob-adapters</artifactId>
<version>2.0.8</version>
<version>2.0.9</version>

<packaging>jar</packaging>
<name>Prebid Mobile Android SDK</name>
Expand Down Expand Up @@ -52,7 +52,7 @@
<dependency>
<groupId>org.prebid</groupId>
<artifactId>prebid-mobile-sdk</artifactId>
<version>2.0.8</version>
<version>2.0.9</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion scripts/Maven/PrebidMobile-core-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>org.prebid</groupId>
<artifactId>prebid-mobile-sdk-core</artifactId>

<version>2.0.8</version>
<version>2.0.9</version>
<packaging>aar</packaging>
<name>Prebid Mobile Android SDK</name>
<description>Prebid Mobile</description>
Expand Down
4 changes: 2 additions & 2 deletions scripts/Maven/PrebidMobile-gamEventHandlers-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.prebid</groupId>
<artifactId>prebid-mobile-sdk-gam-event-handlers</artifactId>
<version>2.0.8</version>
<version>2.0.9</version>

<packaging>jar</packaging>
<name>Prebid Mobile Android SDK</name>
Expand Down Expand Up @@ -52,7 +52,7 @@
<dependency>
<groupId>org.prebid</groupId>
<artifactId>prebid-mobile-sdk</artifactId>
<version>2.0.8</version>
<version>2.0.9</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions scripts/Maven/PrebidMobile-maxAdapters-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.prebid</groupId>
<artifactId>prebid-mobile-sdk-max-adapters</artifactId>
<version>2.0.8</version>
<version>2.0.9</version>

<packaging>jar</packaging>
<name>Prebid Mobile Android SDK</name>
Expand Down Expand Up @@ -52,7 +52,7 @@
<dependency>
<groupId>org.prebid</groupId>
<artifactId>prebid-mobile-sdk</artifactId>
<version>2.0.8</version>
<version>2.0.9</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions scripts/Maven/PrebidMobile-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.prebid</groupId>
<artifactId>prebid-mobile-sdk</artifactId>
<version>2.0.8</version>
<version>2.0.9</version>
<packaging>jar</packaging>

<name>Prebid Mobile Android SDK</name>
Expand Down Expand Up @@ -52,7 +52,7 @@
<dependency>
<groupId>org.prebid</groupId>
<artifactId>prebid-mobile-sdk-core</artifactId>
<version>2.0.8</version>
<version>2.0.9</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down

0 comments on commit 03ea2c8

Please sign in to comment.