Field Name | Description | Default Value |
---|---|---|
token | The token used for tracking events. | - |
collectDeviceId | Determines whether to collect the device ID. | true |
trackApplicationLifecycleEvents | Controls automatic tracking of application lifecycle events. | false |
useLifecycleObserver | Determines whether to use the Lifecycle Observer for event tracking. | false |
flushIntervalInSeconds | The time interval (in seconds) for flushing queued events to the server. | null |
flushAt | The maximum number of events to be queued before flushing to the server. | null |
tag | A custom tag to identify the analytics instance (optional). | null |
Note: The default values mentioned above can be overridden by providing custom values during initialization.
- Download Segment add-on:
implementation 'io.github.aminekarimii:analytiks-segment:1.0.0'
- Create your own Segment client:
val segment = SegmentAnalyticsClient(
token = "YOUR_TOKEN",
collectDeviceId = true,
trackApplicationLifecycleEvents = false,
useLifecycleObserver = false,
flushIntervalInSeconds = null,
flushAt = null,
tag = null
)
Feel free to customize the content and formatting as per your preferences.