Skip to main content

Configuration Options

val config = ZixflowConfigBuilder(
    applicationContext = this,
    apiKey = "YOUR_API_KEY"
)
    // Logging: Set log level for debugging
    .logLevel(ZixflowLogLevel.DEBUG)  // ERROR, INFO, DEBUG

    // Auto-tracking: Automatically track device info
    .autoTrackDeviceAttributes(true)

    // Activity screen tracking: Auto-track activity transitions
    .autoTrackActivityScreens(true)

    // Lifecycle events: Track app open, close, etc.
    .trackApplicationLifecycleEvents(true)

    // API endpoint (custom)
    .apiHost("api-events.zixflow.com/v1")

    // CDN endpoint (custom)
    .cdnHost("api-events.zixflow.com/v1")

    // Event batching
    .flushAt(20)          // Send events after 20 tracked
    .flushInterval(30)    // Or every 30 seconds

    .build()

Log Levels

Control SDK logging verbosity:
import com.zixflow.sdk.ZixflowLogLevel

.logLevel(ZixflowLogLevel.ERROR)  // Errors only
.logLevel(ZixflowLogLevel.INFO)   // Errors + informational
.logLevel(ZixflowLogLevel.DEBUG)  // All messages (development)