diff --git a/CHANGELOG.md b/CHANGELOG.md index e9e49850..3f1245b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 24.7.8 +* Added a config option to content (setZoneTimerInterval) to set content zone timer. (Experimental!) + ## 24.7.7 * Mitigated an issue where an automatically closed autostopped view's duration could have increased when opening new views * Mitigated an issue where, on Android 35 and above, the navigation bar was overlapping with the content display. diff --git a/gradle.properties b/gradle.properties index e156bc74..9da0d8ee 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,7 +22,7 @@ org.gradle.configureondemand=true android.useAndroidX=true android.enableJetifier=true # RELEASE FIELD SECTION -VERSION_NAME=24.7.7 +VERSION_NAME=24.7.8 GROUP=ly.count.android POM_URL=https://github.com/Countly/countly-sdk-android POM_SCM_URL=https://github.com/Countly/countly-sdk-android diff --git a/sdk/src/androidTest/java/ly/count/android/sdk/TestUtils.java b/sdk/src/androidTest/java/ly/count/android/sdk/TestUtils.java index fd176d8b..aff7def1 100644 --- a/sdk/src/androidTest/java/ly/count/android/sdk/TestUtils.java +++ b/sdk/src/androidTest/java/ly/count/android/sdk/TestUtils.java @@ -44,7 +44,7 @@ public class TestUtils { public final static String commonAppKey = "appkey"; public final static String commonDeviceId = "1234"; public final static String SDK_NAME = "java-native-android"; - public final static String SDK_VERSION = "24.7.7"; + public final static String SDK_VERSION = "24.7.8"; public static final int MAX_THREAD_COUNT_PER_STACK_TRACE = 50; public static class Activity2 extends Activity { diff --git a/sdk/src/main/java/ly/count/android/sdk/ConfigContent.java b/sdk/src/main/java/ly/count/android/sdk/ConfigContent.java index c771abe5..870f0f3c 100644 --- a/sdk/src/main/java/ly/count/android/sdk/ConfigContent.java +++ b/sdk/src/main/java/ly/count/android/sdk/ConfigContent.java @@ -2,19 +2,19 @@ public class ConfigContent { - int contentUpdateInterval = 30; + int zoneTimerInterval = 30; ContentCallback globalContentCallback = null; /** * Set the interval for the automatic content update calls * - * @param contentUpdateInterval in seconds + * @param zoneTimerIntervalSeconds in seconds * @return config content to chain calls * @apiNote This is an EXPERIMENTAL feature, and it can have breaking changes */ - private synchronized ConfigContent setContentUpdateInterval(int contentUpdateInterval) { - if (contentUpdateInterval > 0) { - this.contentUpdateInterval = contentUpdateInterval; + public synchronized ConfigContent setZoneTimerInterval(int zoneTimerIntervalSeconds) { + if (zoneTimerIntervalSeconds > 15) { + this.zoneTimerInterval = zoneTimerIntervalSeconds; } return this; } diff --git a/sdk/src/main/java/ly/count/android/sdk/Countly.java b/sdk/src/main/java/ly/count/android/sdk/Countly.java index a3d8be12..4de30d4e 100644 --- a/sdk/src/main/java/ly/count/android/sdk/Countly.java +++ b/sdk/src/main/java/ly/count/android/sdk/Countly.java @@ -47,7 +47,7 @@ of this software and associated documentation files (the "Software"), to deal */ public class Countly { - private final String DEFAULT_COUNTLY_SDK_VERSION_STRING = "24.7.7"; + private final String DEFAULT_COUNTLY_SDK_VERSION_STRING = "24.7.8"; /** * Used as request meta data on every request diff --git a/sdk/src/main/java/ly/count/android/sdk/ModuleContent.java b/sdk/src/main/java/ly/count/android/sdk/ModuleContent.java index 0cfe9e3c..624c5f51 100644 --- a/sdk/src/main/java/ly/count/android/sdk/ModuleContent.java +++ b/sdk/src/main/java/ly/count/android/sdk/ModuleContent.java @@ -19,7 +19,7 @@ public class ModuleContent extends ModuleBase { Content contentInterface; CountlyTimer countlyTimer; private boolean shouldFetchContents = false; - private final int contentUpdateInterval; + private final int zoneTimerInterval; private final ContentCallback globalContentCallback; static int waitForDelay = 0; @@ -30,7 +30,7 @@ public class ModuleContent extends ModuleBase { contentInterface = new Content(); countlyTimer = new CountlyTimer(); - contentUpdateInterval = config.content.contentUpdateInterval; + zoneTimerInterval = config.content.zoneTimerInterval; globalContentCallback = config.content.globalContentCallback; } @@ -90,7 +90,7 @@ void registerForContentUpdates(@Nullable String[] categories) { validCategories = categories; } - countlyTimer.startTimer(contentUpdateInterval, () -> { + countlyTimer.startTimer(zoneTimerInterval, () -> { L.d("[ModuleContent] registerForContentUpdates, waitForDelay: [" + waitForDelay + "], shouldFetchContents: [" + shouldFetchContents + "], categories: [" + Arrays.toString(validCategories) + "]"); if (waitForDelay > 0) {