Skip to content
Merged
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 25.4.8
* 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.

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/main/java/ly/count/android/sdk/Countly.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
18 changes: 17 additions & 1 deletion sdk/src/main/java/ly/count/android/sdk/CountlyConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 disableStoringDefaultPushConsent = false;

/**
* THIS VARIABLE SHOULD NOT BE USED
* IT IS ONLY FOR INTERNAL TESTING
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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 disableStoringDefaultPushConsent() {
this.disableStoringDefaultPushConsent = true;
return this;
}

/**
* APM configuration interface to be used with CountlyConfig
*/
Expand Down
4 changes: 4 additions & 0 deletions sdk/src/main/java/ly/count/android/sdk/ModuleConsent.java
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ void initFinished(@NonNull final CountlyConfig config) {
if (L.logEnabled()) {
checkAllConsentInternal();
}
} 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);
}
}

Expand Down
Loading