Settings
The settings module in our SDK allows you to easily set some options directly from your application to change some of SDK behaviors without a need to reinitialize.
For specific information about settings please check: Settings class reference
This article lists the currently available methods.
Configuring SDK
To ensure correct configuration of the SDK, remember that there are two types of settings:
- pre-initialization
- dynamic
Some of the pre-initialization settings are optional. If you want to use them, they must be configured before Synerise SDK is initialized, before invoking the Synerise.Builder.build()
method.
Pre-initialization settings:
Option | Default | Description |
---|---|---|
Synerise.settings.sdk.shouldDestroySessionOnApiKeyChange |
true | Specifies if a session should be destroyed after a Client’s API key changes. |
Synerise.settings.notifications.setEncryption |
false | Specifies if notifications from Synerise should be encrypted. |
The rest of the options can be changed dynamically anytime.
General
Enable/disable SDK
Parameter | Type | Default |
---|---|---|
Synerise.settings.sdk.enabled |
Bool |
true |
This parameter specifies if the SDK functionalities are enabled.
Minimum time interval to refresh token
Parameter | Type | Default | Minimum Value | Maximum Value |
---|---|---|---|---|
Synerise.settings.sdk.minTokenRefreshInterval |
TimeInterval |
1800 | 1800 | - |
This parameter sets a time interval (in seconds) counting backwards from the expiration time. Within this time, the authorization token will be automatically refreshed by the SDK.
Maintaining client session on different API keys
Parameter | Type | Default |
---|---|---|
Synerise.settings.sdk.shouldDestroySessionOnApiKeyChange |
Bool |
true |
This parameter specifies if a session should be destroyed after the client API key changes.
This option works only if you change the API key within one workspace
To change the API key from a different workspace, use the following method: Client.changeApiKey().
Notifications
Enable/disable notifications
Parameter | Type | Default |
---|---|---|
Synerise.settings.notifications.enabled |
Bool |
true |
This parameter specifies if handling notifications by the SDK is enabled.
Set encryption
Method name: setEncryption(enabled);
Parameter | Type | Default |
---|---|---|
enabled |
boolean |
false |
This parameter specifies if push encryption is enabled.
In-App Messaging
Set maximum time for In-app message rendering
Parameter | Type | Default |
---|---|---|
Synerise.settings.inAppMessaging.renderingTimeout |
TimeInterval |
2.0 |
This parameter sets a timeout for In-app message rendering.
Tracker
Minimum number of events in queue
Parameter | Type | Default | Minimum Value | Maximum Value |
---|---|---|---|---|
Synerise.settings.tracker.minBatchSize |
Integer |
10 | 1 | 100 |
This parameter sets the minimum number of events in queue required to send the queue.
minBatchSize
.Maximum number of events in queue
Parameter | Type | Default | Minimum Value | Maximum Value |
---|---|---|---|---|
Synerise.settings.tracker.maxBatchSize |
Integer |
100 | 1 | 100 |
This parameter sets the maximum number of events which may be sent in a single batch.
Interval between sending attempts
Parameter | Type | Default | Minimum Value | Maximum Value |
---|---|---|---|---|
Synerise.settings.tracker.autoFlushTimeout |
TimeInterval |
5000 | 50 | - |
This parameter sets the time (in milliseconds) required before an attempt is made to sent the queue.
Automatic location event sending
Parameter | Type | Default |
---|---|---|
Synerise.settings.tracker.locationAutomatic |
Bool |
false |
This parameter specifies if location events are sent automatically.
Enable/disable declarative tracking
Parameter | Type | Default |
---|---|---|
Synerise.settings.tracker.tracking.enabled |
Bool |
true |
This parameter specifies if the Declarative Tracking functionality is enabled.
Enable/disable auto-tracking
Parameter | Type | Default |
---|---|---|
Synerise.settings.tracker.autoTracking.enabled |
Bool |
true |
This parameter specifies if the auto-tracking functionality is enabled.
Auto-tracking mode
Parameter | Type | Default |
---|---|---|
Synerise.settings.tracker.autoTracking.trackMode |
TrackMode | FINE |
This parameter defines the auto-tracking mode.
Available modes:
PLAIN
- listeners are set to track screen visits only.FINE
- listeners are attached to nearly everything that is clickable in your app, including screen visits.
Classes excluded from auto-tracking
Parameter | Type | Default |
---|---|---|
Synerise.settings.tracker.autoTracking.excludedClasses |
List<Object> |
[] |
This parameter excludes classes from auto-tracking.