Skip to content
Merged
Changes from 5 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
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ public class IterableConfig {
*/
final IterableAuthHandler authHandler;


/**
* Handler that can be used to retrieve the anonymous user id
*/
final IterableAnonUserHandler iterableAnonUserHandler;

/**
Expand Down Expand Up @@ -92,8 +94,20 @@ public class IterableConfig {

final boolean encryptionEnforced;

/**
* Enables anonymous user activation
*/
final boolean enableAnonActivation;

/**
* Disables fetching of anonymous user criteria on foregrounding when set to true
* By default, the SDK will fetch anonymous user criteria on foregrounding.
*/
final boolean disableForegroundCriteriaFetching;

/**
* The number of anonymous events stored in local storage
*/
final int eventThresholdLimit;

/**
Expand Down Expand Up @@ -130,6 +144,7 @@ private IterableConfig(Builder builder) {
useInMemoryStorageForInApps = builder.useInMemoryStorageForInApps;
encryptionEnforced = builder.encryptionEnforced;
enableAnonActivation = builder.enableAnonActivation;
disableForegroundCriteriaFetching = builder.disableForegroundCriteriaFetching;
enableEmbeddedMessaging = builder.enableEmbeddedMessaging;
eventThresholdLimit = builder.eventThresholdLimit;
identityResolution = builder.identityResolution;
Expand All @@ -155,6 +170,7 @@ public static class Builder {
private IterableDecryptionFailureHandler decryptionFailureHandler;
private boolean encryptionEnforced = false;
private boolean enableAnonActivation = false;
private boolean disableForegroundCriteriaFetching = false;
private boolean enableEmbeddedMessaging = false;
private int eventThresholdLimit = 100;
private IterableIdentityResolution identityResolution = new IterableIdentityResolution();
Expand Down Expand Up @@ -310,7 +326,6 @@ public Builder setDataRegion(@NonNull IterableDataRegion dataRegion) {
* Set whether the SDK should store in-apps only in memory, or in file storage
* @param useInMemoryStorageForInApps `true` will have in-apps be only in memory
*/

@NonNull
public Builder setUseInMemoryStorageForInApps(boolean useInMemoryStorageForInApps) {
this.useInMemoryStorageForInApps = useInMemoryStorageForInApps;
Expand All @@ -327,6 +342,16 @@ public Builder setEnableAnonActivation(boolean enableAnonActivation) {
return this;
}

/**
* Set whether the SDK should disable criteria fetching on foregrounding. Set this to `true`
* if you want criteria to only be fetched on app launch.
* @param disableForegroundCriteriaFetching `true` will fetch criteria only on app launch.
*/
public Builder setDisableForegroundCriteriaFetching(boolean disableForegroundCriteriaFetching) {
this.disableForegroundCriteriaFetching = disableForegroundCriteriaFetching;
return this;
}

public Builder setEventThresholdLimit(int eventThresholdLimit) {
this.eventThresholdLimit = eventThresholdLimit;
return this;
Expand All @@ -348,7 +373,6 @@ public Builder setEnableEmbeddedMessaging(boolean enableEmbeddedMessaging) {
* @param identityResolution
* @return
*/

public Builder setIdentityResolution(IterableIdentityResolution identityResolution) {
this.identityResolution = identityResolution;
return this;
Expand Down
Loading