Companion
object Companion
Functions
Link copied to clipboard
fun init(context: Context, apiUrl: String, apiHeaders: HashMap<String, String> = HashMap(), eventThreshold: List<EventThreshold> = listOf(EventThreshold.NumBased()), apiKey: String, cacheScheme: ICacheScheme = FileCacheManager(
context = context.applicationContext,
filePath = generateFilePath(apiKey)
), eventValidationConfig: EventValidationConfig = EventValidationConfig(), enableLogs: Boolean = BuildConfig.DEBUG, logger: Logger = EventKtLog(enableLogs)): EventKtTracker
Init - To make network call at library whenever a batch of events is ready
Link copied to clipboard
fun initWithCallback(context: Context, eventThreshold: List<EventThreshold> = listOf(EventThreshold.NumBased()), directoryName: String, cacheScheme: ICacheScheme = FileCacheManager(
context = context.applicationContext,
filePath = directoryName
), eventValidationConfig: EventValidationConfig = EventValidationConfig(), enableLogs: Boolean = BuildConfig.DEBUG, logger: Logger = EventKtLog(enableLogs), makeNetworkRequest: suspend (String, List<EventNameParam>) -> Boolean): EventKtTracker
Init with callback - To send the list of EventNameParam and request body to client whenever a batch of events is ready