From d7ef4c4a88bf2404d71a43dd8c50b94052fbc250 Mon Sep 17 00:00:00 2001 From: Arif Burak Demiray Date: Thu, 20 Nov 2025 15:58:57 +0300 Subject: [PATCH 1/5] fix: PN hardkill consent issue --- sdk/src/main/java/ly/count/android/sdk/ModuleConsent.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk/src/main/java/ly/count/android/sdk/ModuleConsent.java b/sdk/src/main/java/ly/count/android/sdk/ModuleConsent.java index a4477d57e..bc8e1b813 100644 --- a/sdk/src/main/java/ly/count/android/sdk/ModuleConsent.java +++ b/sdk/src/main/java/ly/count/android/sdk/ModuleConsent.java @@ -284,6 +284,10 @@ void initFinished(@NonNull final CountlyConfig config) { if (L.logEnabled()) { checkAllConsentInternal(); } + } else { + //if consent is not required, we need to make sure that the push consent is set to true + //so that the "getConsentPushNoInit" returns true + doPushConsentSpecialAction(true); } } From 86140b5a0963d303e3d16c619ae01929680f0d4d Mon Sep 17 00:00:00 2001 From: Arif Burak Demiray Date: Thu, 20 Nov 2025 16:11:00 +0300 Subject: [PATCH 2/5] fix: changelog for it --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 998d37dcc..a73e9cb68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## XX.XX.XX +* Mitigated an issue where push notifications were blocked when consent was not required. + ## 25.4.6 * Improved content error handling and display mechanics. * Updated user properties caching mechanism according to sessions. From a6ab181b50a31b2a9fad58011c85f2bc4ed5fd1e Mon Sep 17 00:00:00 2001 From: Arif Burak Demiray Date: Mon, 24 Nov 2025 15:54:47 +0300 Subject: [PATCH 3/5] feat: new config option to reverse it --- CHANGELOG.md | 2 ++ .../ly/count/android/sdk/CountlyConfig.java | 18 +++++++++++++++++- .../ly/count/android/sdk/ModuleConsent.java | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17ba0cfb9..804698061 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ ## XX.XX.XX +* Added a new config option `disableStoreDefaultPushConsent()` to change push consent storing behavior. When enabled default push consent will be stored if consent is not required. + * Mitigated an issue where push notifications were blocked when consent was not required. ## 25.4.7 diff --git a/sdk/src/main/java/ly/count/android/sdk/CountlyConfig.java b/sdk/src/main/java/ly/count/android/sdk/CountlyConfig.java index 3785cfd30..0c602c7da 100644 --- a/sdk/src/main/java/ly/count/android/sdk/CountlyConfig.java +++ b/sdk/src/main/java/ly/count/android/sdk/CountlyConfig.java @@ -213,6 +213,9 @@ public class CountlyConfig { // If set to true, request queue cleaner will remove all overflow at once instead of gradually (loop limited) removing boolean disableGradualRequestCleaner = false; + // If set to true, the SDK will not store the default push consent state on initialization for not requiring consent + boolean disableStoreDefaultPushConsent = false; + /** * THIS VARIABLE SHOULD NOT BE USED * IT IS ONLY FOR INTERNAL TESTING @@ -1063,7 +1066,7 @@ public synchronized CountlyConfig setRequestTimeoutDuration(int requestTimeoutDu * Set the webview display option for Content and Feedback Widgets * * @param displayOption IMMERSIVE for full screen with hidden system UI, or - * SAFE_AREA to use app usable area and not overlap system UI + * SAFE_AREA to use app usable area and not overlap system UI * @return config content to chain calls */ public synchronized CountlyConfig setWebviewDisplayOption(WebViewDisplayOption displayOption) { @@ -1100,6 +1103,19 @@ public synchronized CountlyConfig disableGradualRequestCleaner() { return this; } + /** + * Disable storing the default push consent on initialization. + * By default, if consent is required and push consent is not set, + * the SDK was storing push consent as false on initialization. + * Now, if consent is not required, the SDK will store push consent as true on initialization. + * + * @return Returns the same config object for convenient linking + */ + public synchronized CountlyConfig disableStoreDefaultPushConsent() { + this.disableStoreDefaultPushConsent = true; + return this; + } + /** * APM configuration interface to be used with CountlyConfig */ diff --git a/sdk/src/main/java/ly/count/android/sdk/ModuleConsent.java b/sdk/src/main/java/ly/count/android/sdk/ModuleConsent.java index bc8e1b813..556b8d7f4 100644 --- a/sdk/src/main/java/ly/count/android/sdk/ModuleConsent.java +++ b/sdk/src/main/java/ly/count/android/sdk/ModuleConsent.java @@ -284,7 +284,7 @@ void initFinished(@NonNull final CountlyConfig config) { if (L.logEnabled()) { checkAllConsentInternal(); } - } else { + } else if (!config.disableStoreDefaultPushConsent) { //if consent is not required, we need to make sure that the push consent is set to true //so that the "getConsentPushNoInit" returns true doPushConsentSpecialAction(true); From 62fe0a59d494fb3d0b07669b3be310ed550907b1 Mon Sep 17 00:00:00 2001 From: Arif Burak Demiray Date: Fri, 28 Nov 2025 09:41:28 +0300 Subject: [PATCH 4/5] mixed: changelog, new name --- CHANGELOG.md | 6 ++---- gradle.properties | 2 +- .../androidTest/java/ly/count/android/sdk/TestUtils.java | 2 +- sdk/src/main/java/ly/count/android/sdk/Countly.java | 2 +- sdk/src/main/java/ly/count/android/sdk/CountlyConfig.java | 6 +++--- sdk/src/main/java/ly/count/android/sdk/ModuleConsent.java | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 804698061..81e08630b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,5 @@ -## XX.XX.XX -* Added a new config option `disableStoreDefaultPushConsent()` to change push consent storing behavior. When enabled default push consent will be stored if consent is not required. - -* Mitigated an issue where push notifications were blocked when consent was not required. +## 25.4.8 +* Mitigated an issue where push notifications were not shown when consent was not required and app is killed. To reverse that behavior you can call config option `disableStoringDefaultPushConsent()`. ## 25.4.7 * Mitigated an issue where the navigation bar showed an unwanted shadow during content display. diff --git a/gradle.properties b/gradle.properties index 733f2954a..56f0bc5d8 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=25.4.7 +VERSION_NAME=25.4.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 0a5de3b3a..e3de884af 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 = "25.4.7"; + public final static String SDK_VERSION = "25.4.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/Countly.java b/sdk/src/main/java/ly/count/android/sdk/Countly.java index 748dda9c6..eeb3859c8 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 = "25.4.7"; + private final String DEFAULT_COUNTLY_SDK_VERSION_STRING = "25.4.8"; /** * Used as request meta data on every request */ diff --git a/sdk/src/main/java/ly/count/android/sdk/CountlyConfig.java b/sdk/src/main/java/ly/count/android/sdk/CountlyConfig.java index 0c602c7da..1ca2b10ca 100644 --- a/sdk/src/main/java/ly/count/android/sdk/CountlyConfig.java +++ b/sdk/src/main/java/ly/count/android/sdk/CountlyConfig.java @@ -214,7 +214,7 @@ public class CountlyConfig { boolean disableGradualRequestCleaner = false; // If set to true, the SDK will not store the default push consent state on initialization for not requiring consent - boolean disableStoreDefaultPushConsent = false; + boolean disableStoringDefaultPushConsent = false; /** * THIS VARIABLE SHOULD NOT BE USED @@ -1111,8 +1111,8 @@ public synchronized CountlyConfig disableGradualRequestCleaner() { * * @return Returns the same config object for convenient linking */ - public synchronized CountlyConfig disableStoreDefaultPushConsent() { - this.disableStoreDefaultPushConsent = true; + public synchronized CountlyConfig disableStoringDefaultPushConsent() { + this.disableStoringDefaultPushConsent = true; return this; } diff --git a/sdk/src/main/java/ly/count/android/sdk/ModuleConsent.java b/sdk/src/main/java/ly/count/android/sdk/ModuleConsent.java index 556b8d7f4..2671bfd82 100644 --- a/sdk/src/main/java/ly/count/android/sdk/ModuleConsent.java +++ b/sdk/src/main/java/ly/count/android/sdk/ModuleConsent.java @@ -284,7 +284,7 @@ void initFinished(@NonNull final CountlyConfig config) { if (L.logEnabled()) { checkAllConsentInternal(); } - } else if (!config.disableStoreDefaultPushConsent) { + } else if (!config.disableStoringDefaultPushConsent) { //if consent is not required, we need to make sure that the push consent is set to true //so that the "getConsentPushNoInit" returns true doPushConsentSpecialAction(true); From 4359ed3bc13fe0babc6cbae38ca807442e2b90ca Mon Sep 17 00:00:00 2001 From: turtledreams <62231246+turtledreams@users.noreply.github.com> Date: Fri, 28 Nov 2025 15:48:48 +0900 Subject: [PATCH 5/5] Remove redundant text from CHANGELOG entry --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81e08630b..1af367ea2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ ## 25.4.8 -* Mitigated an issue where push notifications were not shown when consent was not required and app is killed. To reverse that behavior you can call config option `disableStoringDefaultPushConsent()`. +* Mitigated an issue where push notifications were not shown when consent was not required and app was killed. ## 25.4.7 * Mitigated an issue where the navigation bar showed an unwanted shadow during content display.