Skip to content

Commit

Permalink
Update CAS 3.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
d.eshenko committed Aug 23, 2023
1 parent 2287ae3 commit da98ab7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.cas_version = '3.2.3'
ext.kotlin_version = '1.8.20'
ext.cas_version = '3.2.4'
ext.kotlin_version = '1.8.22'
repositories {
google()
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,23 @@ public void onCreate() {
//CAS.settings.setLoadingMode(LoadingManagerMode.Manual);

// Initialize SDK
adManager = CAS.buildManager()
CAS.buildManager()
.withManagerId("demo")
.withAdTypes(AdType.Banner, AdType.Interstitial, AdType.Rewarded)
.withTestAdMode(true)
.withConsentFlow(
new ConsentFlow(true)
//.withPrivacyPolicy("http://")
.withDismissListener(status -> {
Log.d(TAG, "Consent Flow dismissed");
})
)
.withCompletionListener(config -> {
if (config.getError() == null)
if (config.getError() == null) {
Log.d(TAG, "Ad manager initialized");
else
adManager = config.getManager();
} else {
Log.d(TAG, "Ad manager initialization failed: " + config.getError());
}
})
.initialize(this);
}
Expand Down
4 changes: 2 additions & 2 deletions kotlinSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ android {

// Required version
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,23 @@ class SampleApplication : Application() {
//CAS.settings.loadingMode = LoadingManagerMode.Manual

// Initialize SDK
adManager = CAS.buildManager()
CAS.buildManager()
.withManagerId("demo")
.withTestAdMode(true)
.withAdTypes(AdType.Banner, AdType.Interstitial, AdType.Rewarded)
.withConsentFlow(
ConsentFlow(isEnabled = true)
//.withPrivacyPolicy("https://url")
.withDismissListener{
Log.d(TAG, "Consent flow dismissed")
}
)
.withCompletionListener {
if (it.error == null)
if (it.error == null) {
Log.d(TAG, "Ad manager initialized")
else
adManager = it.manager
} else {
Log.d(TAG, "Ad manager initialization failed: " + it.error)
}
}
.initialize(this)
}
Expand Down

0 comments on commit da98ab7

Please sign in to comment.