Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP]Integration ADG #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
8 changes: 6 additions & 2 deletions Example/PrebidDemoJava/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ android {
versionName rootProject.prebidVersionName

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true

}
flavorDimensions "version"
Expand Down Expand Up @@ -57,8 +58,10 @@ dependencies {

localJarImplementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.google.android.gms:play-services-ads:17.1.3'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.gms:play-services-base:16.1.0'
implementation 'com.google.android.gms:play-services-ads:17.2.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation('com.mopub:mopub-sdk:5.8.0@aar') {
transitive = true

Expand All @@ -74,4 +77,5 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-web:3.1.1'
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.2.0'
androidTestImplementation 'org.mockito:mockito-android:2.24.0'
implementation project(path: ':adg-2.17.0-prebid')
}
1 change: 1 addition & 0 deletions Example/PrebidDemoJava/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:networkSecurityConfig="@xml/network_security_config"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config>
<base-config cleartextTrafficPermitted="false">
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
<debug-overrides>
<trust-anchors>
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</base-config>
<domain-config cleartextTrafficPermitted="true">
<!-- FAN -->
<domain includeSubdomains="true">127.0.0.1</domain>
<!-- 87769 OMSDK -->
<domain includeSubdomains="true">complianceomsdk.iabtechlab.com</domain>
<!-- 96393 -->
<domain includeSubdomains="true">s3-ap-northeast-1.amazonaws.com</domain>
</domain-config>
</network-security-config>
13 changes: 5 additions & 8 deletions Example/PrebidDemoKotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ android {
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// multiDexEnabled true
}
buildTypes {
release {
Expand All @@ -30,15 +31,11 @@ dependencies {

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.google.android.gms:play-services-ads:17.1.3'
implementation('com.mopub:mopub-sdk:5.4.1@aar') {
transitive = true

exclude module: 'libAvid-mopub' // To exclude AVID
exclude module: 'moat-mobile-app-kit' // To exclude Moat
}

implementation 'com.google.android.gms:play-services-base:16.1.0'
implementation 'com.google.android.gms:play-services-ads:17.2.0'
// implementation 'androidx.multidex:multidex:2.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation project(path: ':adg-2.17.0-prebid')
}
1 change: 1 addition & 0 deletions Example/PrebidDemoKotlin/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,39 +29,18 @@ object Constants {
internal val PBS_CONFIG_ID_300x250_APPNEXUS = "6ace8c7d-88c0-4623-8117-75bc3f0a2e45"
internal val PBS_CONFIG_ID_320x50_APPNEXUS = "625c6125-f19e-4d5b-95c5-55501526b2a4"
internal val PBS_CONFIG_ID_INTERSTITIAL_APPNEXUS = "625c6125-f19e-4d5b-95c5-55501526b2a4"
// MoPub ad unit ids
internal val MOPUB_BANNER_ADUNIT_ID_300x250_APPNEXUS = "a935eac11acd416f92640411234fbba6"
internal val MOPUB_BANNER_ADUNIT_ID_320x50_APPNEXUS = "9dbccb87ab4d4a178450c0bc986b4571"
internal val MOPUB_INTERSTITIAL_ADUNIT_ID_APPNEXUS = "2829868d308643edbec0795977f17437"
// DFP ad unit ids
internal val DFP_BANNER_ADUNIT_ID_300x250_APPNEXUS = "/19968336/PriceCheck_300x250"
internal val DFP_BANNER_ADUNIT_ID_ALL_SIZES_APPNEXUS = "/19968336/PrebidMobileValidator_Banner_All_Sizes"
internal val DFP_INTERSTITIAL_ADUNIT_ID_APPNEXUS = "/19968336/PriceCheck_Interstitial"

//RubiconProject
// Prebid server config ids
internal val PBS_ACCOUNT_ID_RUBICON = "1001"
internal val PBS_CONFIG_ID_300x250_RUBICON = "1001-1"
internal val PBS_CONFIG_ID_INTERSTITIAL_RUBICON = ""
// MoPub ad unit ids
internal val MOPUB_BANNER_ADUNIT_ID_300x250_RUBICON = "a108b8dd5ebc472098167e6f1c118120"
internal val MOPUB_INTERSTITIAL_ADUNIT_ID_RUBICON = ""
// DFP ad unit ids
internal val DFP_BANNER_ADUNIT_ID_300x250_RUBICON =
"/5300653/test_adunit_pavliuchyk_300x250_prebid-server.rubiconproject.com_puc"
internal val DFP_INTERSTITIAL_ADUNIT_ID_RUBICON = ""
// ad unit ids
internal val BANNER_ADUNIT_ID_300x250_APPNEXUS = "83561"
internal val BANNER_ADUNIT_ID_320x50_APPNEXUS = "79994"
internal val INTERSTITIAL_ADUNIT_ID_APPNEXUS = ""

internal var PBS_ACCOUNT_ID = PBS_ACCOUNT_ID_APPNEXUS
internal var PBS_CONFIG_ID_300x250 = PBS_CONFIG_ID_300x250_APPNEXUS
internal var PBS_CONFIG_ID_320x50 = PBS_CONFIG_ID_320x50_APPNEXUS
internal var PBS_CONFIG_ID_INTERSTITIAL = PBS_CONFIG_ID_INTERSTITIAL_APPNEXUS
// MoPub ad unit ids
internal var MOPUB_BANNER_ADUNIT_ID_300x250 = MOPUB_BANNER_ADUNIT_ID_300x250_APPNEXUS
internal var MOPUB_BANNER_ADUNIT_ID_320x50 = MOPUB_BANNER_ADUNIT_ID_320x50_APPNEXUS
internal var MOPUB_INTERSTITIAL_ADUNIT_ID = MOPUB_INTERSTITIAL_ADUNIT_ID_APPNEXUS
// DFP ad unit ids
internal var DFP_BANNER_ADUNIT_ID_300x250 = DFP_BANNER_ADUNIT_ID_300x250_APPNEXUS
internal var DFP_BANNER_ADUNIT_ID_ALL_SIZES = DFP_BANNER_ADUNIT_ID_ALL_SIZES_APPNEXUS
internal var DFP_INTERSTITIAL_ADUNIT_ID = DFP_INTERSTITIAL_ADUNIT_ID_APPNEXUS
// ad unit ids
internal var BANNER_ADUNIT_ID_300x250 = BANNER_ADUNIT_ID_300x250_APPNEXUS
internal var BANNER_ADUNIT_ID_320x50 = BANNER_ADUNIT_ID_320x50_APPNEXUS
internal var INTERSTITIAL_ADUNIT_ID = INTERSTITIAL_ADUNIT_ID_APPNEXUS

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,19 @@ import android.app.Application
import android.content.Intent
import android.os.Bundle
import android.view.WindowManager.LayoutParams.*
import com.mopub.common.MoPub
import com.mopub.common.SdkConfiguration
import org.prebid.mobile.Host
import org.prebid.mobile.PrebidMobile
//import androidx.multidex.MultiDexApplication
import java.util.*

class CustomApplication : Application() {
override fun onCreate() {
super.onCreate()
//init MoPub SDK
val networksToInit = ArrayList<String>()
networksToInit.add("com.mopub.mobileads.VungleRewardedVideo")
val sdkConfiguration = SdkConfiguration.Builder("a935eac11acd416f92640411234fbba6")
.withNetworksToInit(networksToInit)
.build()
MoPub.initializeSdk(this, sdkConfiguration, null)
//set Prebid Mobile global Settings
//region PrebidMobile API
PrebidMobile.setPrebidServerAccountId(Constants.PBS_ACCOUNT_ID)
PrebidMobile.setPrebidServerHost(Host.APPNEXUS)
PrebidMobile.setTimeoutMillis(5_000)
PrebidMobile.setShareGeoLocation(true)
PrebidMobile.setApplicationContext(applicationContext)
//endregion
Expand Down
Loading