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
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@
* The consent requirement, applied on the next initialization
* SDK internal limits for key length, value size, segmentation value count, stack trace lines per thread, stack trace line length, and breadcrumb count
* Listing filters (blacklist/whitelist) for events, segmentation keys, event specific segmentation keys, and user properties, plus a user property cache limit
* Entering, refreshing, and the fetch interval of the content zone, plus Journey Trigger Events and Journey Trigger Views that refresh it
* Entering the content zone at initialization, refreshing it, and its fetch interval, plus Journey Trigger Events and Journey Trigger Views, which ask for content right away while the server sends no content triggers
* Dropping requests older than a given age
* Added content triggers. When the application records something that starts a journey or a campaign with content, the SDK sends the queued requests and asks for that content right away, instead of waiting for the content zone timer:
* The triggers are events, the start or the end of a view, a new session, a user property and a recorded exception.
* The server lists them in its SDK behavior settings answer, and they apply while the content zone is entered.
* Call "disableAutoContentTriggers()" on the content config to turn them off.
* Added "setSdkBehaviorSettings(String)" init config method for providing SDK behavior settings at initialization.
* Added "disableSdkBehaviorSettingsUpdates()" init config method for disabling SDK behavior settings requests.
* Improved request queue handling with a built-in backoff mechanism which is enabled by default. When the server takes 10 seconds or longer to answer while few requests are queued, the SDK pauses sending for 60 seconds.
Expand Down
9 changes: 9 additions & 0 deletions sdk-java/api/sdk-java.txt
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,11 @@ package ly.count.sdk.java.internal {

public class ConfigContent {
ctor public ConfigContent(ly.count.sdk.java.Config!);
method public ly.count.sdk.java.Config! disableAutoContentTriggers();
method public ly.count.sdk.java.Config! setContentUrlHandler(ly.count.sdk.java.internal.ContentUrlHandler!);
method public ly.count.sdk.java.Config! setGlobalContentCallback(ly.count.sdk.java.internal.ContentCallback!);
method public ly.count.sdk.java.Config! setZoneTimerInterval(int);
field protected boolean autoContentTriggersDisabled;
field protected ly.count.sdk.java.internal.ContentUrlHandler! contentUrlHandler;
field protected ly.count.sdk.java.internal.ContentCallback! globalContentCallback;
field protected int zoneTimerInterval;
Expand All @@ -419,6 +421,7 @@ package ly.count.sdk.java.internal {
method public double getBOMRQPercentage();
method public int getBOMRequestAge();
method public boolean getConsentRequired();
method public ly.count.sdk.java.internal.ContentTriggers? getContentTriggers();
method public boolean getContentZoneEnabled();
method public int getContentZoneTimerInterval();
method public boolean getCrashReportingEnabled();
Expand Down Expand Up @@ -827,6 +830,7 @@ package ly.count.sdk.java.internal {
method public double getBOMRQPercentage();
method public int getBOMRequestAge();
method public boolean getConsentRequired();
method public ly.count.sdk.java.internal.ContentTriggers? getContentTriggers();
method public boolean getContentZoneEnabled();
method public int getContentZoneTimerInterval();
method public boolean getCrashReportingEnabled();
Expand Down Expand Up @@ -1248,6 +1252,7 @@ package ly.count.sdk.java.internal {

public class SDKStorage implements ly.count.sdk.java.internal.StorageProvider {
ctor protected SDKStorage();
method public String! getContentTriggerGaps();
method public String! getDeviceID();
method public String! getDeviceIdType();
method public String! getHealthCheckState();
Expand All @@ -1258,6 +1263,7 @@ package ly.count.sdk.java.internal {
method public ly.count.sdk.java.internal.SDKStorage! init(ly.count.sdk.java.internal.InternalConfig!);
method public boolean isCountlyStorageEmpty();
method protected String! readEventQueue();
method public void setContentTriggerGaps(String!);
method public void setDeviceID(String!);
method public void setDeviceIdType(String!);
method public void setHealthCheckState(String!);
Expand All @@ -1281,6 +1287,7 @@ package ly.count.sdk.java.internal {
field protected static final String FILE_NAME_PREFIX = "[CLY]";
field protected static final String FILE_NAME_SEPARATOR = "_";
field protected static final String JSON_FILE_NAME = "countly_store.json";
field protected static final String key_content_trigger_gaps = "CONTENT_TRIGGER_GAPS";
field protected static final String key_device_id = "did";
field protected static final String key_device_id_type = "did_t";
field protected static final String key_health_check = "HEALTH_CHECK";
Expand Down Expand Up @@ -1365,6 +1372,7 @@ package ly.count.sdk.java.internal {
}

public interface StorageProvider {
method public String! getContentTriggerGaps();
method public String! getDeviceID();
method public String! getDeviceIdType();
method public String! getHealthCheckState();
Expand All @@ -1373,6 +1381,7 @@ package ly.count.sdk.java.internal {
method public String! getServerConfig();
method public void incrementAutomaticCrashCount();
method public boolean isCountlyStorageEmpty();
method public void setContentTriggerGaps(String!);
method public void setDeviceID(String!);
method public void setDeviceIdType(String!);
method public void setHealthCheckState(String!);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class ConfigContent {
protected int zoneTimerInterval = DEFAULT_ZONE_TIMER_INTERVAL;
protected ContentCallback globalContentCallback = null;
protected ContentUrlHandler contentUrlHandler = null;
protected boolean autoContentTriggersDisabled = false;

public ConfigContent(Config config) {
this.config = config;
Expand Down Expand Up @@ -63,4 +64,17 @@ public synchronized Config setGlobalContentCallback(ContentCallback callback) {
this.globalContentCallback = callback;
return config;
}

/**
* Turn off the content triggers: the SDK does not ask the server for them and does not follow
* the ones it has, so content comes only with the content zone timer, as before. The journey
* trigger events and views of the SDK behavior settings still apply.
*
* @return the same config object for convenient linking
* @apiNote This is an EXPERIMENTAL feature, and it can have breaking changes
*/
public synchronized Config disableAutoContentTriggers() {
this.autoContentTriggersDisabled = true;
return config;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,14 @@ public interface ConfigurationProvider {
*/
@Nonnull Set<String> getJourneyTriggerViews();

/**
* Key {@code jt}, next to the settings.
*
* @return the content triggers the server sent, {@code null} when it sent none or an invalid
* value, or when content triggers are turned off, so the journey trigger events and views apply
*/
@Nullable ContentTriggers getContentTriggers();

/**
* Whether a request body may be sent gzip-compressed now: the developer turned request
* compression on, the current server said in its SDK behavior settings answer that it reads
Expand Down
Loading
Loading