Miscellaneous
Settings
Class model for settings.
Declared In
com.synerise.sdk.core.settings.Settings
Declaration
public class Settings
Properties
Property | Type | Optional | Default | Description |
---|---|---|---|---|
tracker | TrackerSettings | no | - | Tracker settings class |
sdk | GeneralSettings | no | - | Main SDK settings class |
notifications | NotificationSettings | no | - | Notifications settings class |
injector | InjectorSettings | no | - | Injector settings class |
Initializers
There are no initializers.
Methods
This method retrieves the instance method.
public static Settings getInstance()
GeneralSettings
Class model for general SDK settings.
Declared In
com.synerise.sdk.core.settings.GeneralSettings
Declaration
public class GeneralSettings
Properties
Property | Type | Optional | Default | Description |
---|---|---|---|---|
enabled | boolean |
no | true | Indicates if SDK is enabled |
shouldDestroySessionOnApiKeyChange | boolean |
no | true | Indicates if a session should be destroyed after changing apiKey |
minTokenRefreshInterval | int |
no | 60 * 30 | Track mode |
Initializers
There are no initializers.
Methods
This method sets time interval counting backwards from expirationTime, within which token will be automatically refreshed by the SDK.
public void setMinTokenRefreshInterval(int time)
This method retrieves the minimum token refresh interval.
public int getMinTokenRefreshInterval()
NotificationSettings
Class model for notification settings.
Declared In
com.synerise.sdk.core.settings.NotificationSettings
Declaration
public class NotificationSettings
Properties
Property | Type | Optional | Default | Description |
---|---|---|---|---|
enabled | boolean |
no | true | Indicates if notifications are enabled |
encryption | boolean |
no | false | Indicates if a session should be destroyed after changing the apiKey |
Initializers
There are no initializers.
Methods
This method defines the value of the encryption
parameter (notification encryption).
public void setEncryption(boolean enabled)
This method retrieves the notification encryption status.
public boolean getEncryption()
InjectorSettings
Class model for injector settings.
Declared In
com.synerise.sdk.core.settings.InjectorSettings
Declaration
public class InjectorSettings
Properties
Property | Type | Optional | Default | Description |
---|---|---|---|---|
automatic | boolean |
no | false | Indicates if the injector should show a walkthrough automatically |
Initializers
There are no initializers.
Methods
There are no methods.
TrackerSettings
Class model for tracker settings.
Declared In
com.synerise.sdk.core.settings.TrackerSettings
Declaration
public class TrackerSettings
Properties
Property | Type | Optional | Default | Description |
---|---|---|---|---|
autoTracking | TrackerAutoTrackingSettings |
no | - | AutoTracking settings class |
isBackendTimeSyncRequired | boolean |
no | true | This parameter specifies if time sync is required to send event or not. |
tracking | TrackerDeclarativeTrackingSettings |
no | - | Declarative tracking settings class |
locationAutomatic | boolean |
no | false | Informs whether to show walkthrough automatically or not |
minBatchSize | int |
no | 10 | Minimum number of events in one batch |
maxBatchSize | int |
no | 100 | Maximum number of events in one batch |
autoFlushTimeout | int |
no | 5000 | Time to send a batch in ms |
Initializers
There are no initializers.
Methods
This method defines the value of the minimum batch size.
public void setMinimumBatchSize(int size)
This method defines the value of the maximum batch size.
public void setMinimumBatchSize(int size)
This method defines auto flush timeout.
public void setAutoFlushTimeout(int time)
TrackMode
This enum contains the values which set a mode for tracking component interactions from the android.widget
package.
Declared In
com.synerise.sdk.core.types.enums.TrackMode
Declaration
public enum TrackMode
Values
Property | Description |
---|---|
PLAIN | Tracks screen-visits. Events are sent when onStart of activities/Fragments is called. |
FINE | Tracks screen-visits and onClick events from components such as Buttons, ImageButtons, RatingBars |
Methods
There are no methods.
Errors
ApiError
Class responsible for managing errors.
Declared In
com.synerise.sdk.error.ApiError
Declaration
public class ApiError
Properties
Property | Type | Optional | Default | Description |
---|---|---|---|---|
errorBody | ApiErrorBody | no | - | API Error Body |
httpErrorCategory | HttpErrorCategory | no | - | HTTP error category |
errorType | ErrorType | no | - | Error type |
httpCode | int |
no | - | HTTP error code |
throwable | Throwable |
no | - | Android throwable |
Initializers
There are no initializers.
Methods
Prints stack trace on original Throwable instance.
public void printStackTrace()
ApiErrorBody
Class responsible for providing the API error body.
Declared In
com.synerise.sdk.error.ApiErrorBody
Declaration
public class ApiErrorBody implements Serializable
Properties
Property | Type | Optional | Default | Description |
---|---|---|---|---|
error | String |
no | - | String representation of the returned HTTP status code |
message | String |
no | - | Error message |
path | String |
no | - | Endpoint path in which the error has occurred |
status | int |
no | - | Error’s HTTP status code |
errorCauses | List<ApiErrorCause> | yes | - | Optional list of error causes, mostly occurs when 400 HTTP code is returned |
Initializers
There are no initializers.
Methods
There are only getters.
ApiErrorCause
Class responsible for providing the API error cause.
Declared In
com.synerise.sdk.error.ApiErrorCause
Declaration
public class ApiErrorCause implements Serializable
Properties
Property | Type | Optional | Default | Description |
---|---|---|---|---|
field | String |
yes | - | Main error cause, for example, the name of the field that failed validation |
message | String |
yes | - | Error message |
code | int |
no | - | Unique error cause code |
rejectedValue | String |
yes | - | Optional rejected value |
Initializers
There are no initializers.
Methods
There are only getters.
ErrorType
This enum contains values for error types.
Declared In
com.synerise.sdk.error.ErrorType
Declaration
public enum ErrorType
Values
Property | Description |
---|---|
HTTP_ERROR | HTTP error |
NETWORK_ERROR | Network error |
NO_TOKEN | No token |
UNKNOWN | Unknown error type |
Methods
There are no methods.
HttpErrorCategory
This enum contains values for HTTP error categories.
Declared In
com.synerise.sdk.error.HttpErrorCategory
Declaration
public enum HttpErrorCategory
Values
Property | Value | Description |
---|---|---|
BAD_REQUEST | 400 | Bad request |
UNAUTHORIZED | 401 | Unauthorized (no token, wrong token) |
FORBIDDEN | 403 | Forbidden (insufficient permissions) |
NOT_FOUND | 404 | Resource not found |
RANGE_NOT_SATISFIABLE | 416 | Range not satisfiable |
SERVER_ERROR | 500-599 | Server error |
UNKNOWN | -1 | Unknown error |
Methods
This method retrieves the HTTP error category.
public static HttpErrorCategory getHttpErrorCategory(int code)
Misc
ApiQuerySortingOrder
This enum contains values for query sorting order.
Declared In
com.synerise.sdk.core.types.enums.ApiQuerySortingOrder
Declaration
public enum ApiQuerySortingOrder
Values
Property | Value | Description |
---|---|---|
ASCENDING | “asc” | Sorting order |
DESCENDING | “desc” | Sorting order |
Methods
This method retrieves the order.
public String getOrder()
This method retrieves the order.
public static ApiQuerySortingOrder getBySortingOrder(String order)
Audience
Audience model.
Declared In
com.synerise.sdk.content.model.Audience
Declaration
public class Audience
Properties
Property | Type | Optional | Default | Description |
---|---|---|---|---|
ids | List<String> |
no | - | List of IDs |
query | String |
no | - | Query |
Methods
There are getters and setters for the above properties.
ScreenViewResponse
Class responsible for receiving recommendations.
Declared In
com.synerise.sdk.content.model.ScreenViewResponse
Declaration
public class ScreenViewResponse
Properties
Property | Type | Optional | Default | Description |
---|---|---|---|---|
audience | Audience | no | - | Audience of a screenView |
createdAt | String |
no | - | Creation time of a screenView |
data | Object |
no | - | Content of a screenView |
id | String |
no | - | ScreenView ID |
hash | String |
no | - | ScreenView hash |
name | String |
no | - | ScreenView name |
parentVersion | String |
no | - | ScreenView parent version |
path | String |
no | - | ScreenView path |
priority | Integer |
no | - | ScreenView priority |
updatedAt | String |
no | - | ScreenView update time |
version | String |
no | - | ScreenView version |
Initializers
There are no initializers.
Methods
Getters and setters for the above properties.