
Manages remote configuration, event tracking, and logging in mobile applications. Features include reactive updates, automatic user identification, and structured logging with various severity levels.
A Kotlin Multiplatform library for managing remote configuration, event tracking, and logging in your mobile applications.
Add the dependency to your build.gradle.kts:
// For multiplatform projects
sourceSets {
commonMain {
dependencies {
implementation("com.haumealabs:haumea-kmp:1.1.0")
}
}
}
// For Android-only projects
implementation("com.haumealabs:haumea-kmp:1.1.0")Note: CocoaPods integration is not required; consume the KMP artifact directly in your shared module.
import com.haumealabs.haumea.HaumeaClient
// Initialize the client with required parameters
val haumeaClient = HaumeaClient(
apiKey = "your-api-key",
appId = "your-app-id" // required by constructor; not used by the current backend
)
// Optionally set a custom user ID
haumeaClient.userId = "custom-user-id"// Fetch configuration (suspending)
val result = haumeaClient.fetchConfig()
result.onSuccess { config ->
val featureEnabled = config["feature_flag"]?.toBoolean() ?: false
}.onFailure { error ->
// Handle error
}
// Or observe configuration changes
haumeaClient.configState.collect { config ->
config?.let {
// React to config changes
}
}// Track an event
haumeaClient.addEvent(
eventName = "button_click",
params = mapOf(
"button_name" to "submit",
"screen" to "home"
),
onSuccess = { /* sent */ },
onError = { /* handle */ }
)// Send a log with severity
haumeaClient.addLog(
severity = "info", // recommended: "debug", "info", "warn", "error"
message = "User completed onboarding",
onSuccess = { /* sent */ },
onError = { /* handle */ }
)// Don't forget to close the client when done
haumeaClient.close()All network operations are non-blocking and include error callbacks. Common error cases include:
https://tgkcqvkyxpephsbhrkqm.functions.supabase.co
GET /sdk-flags (reads remote flags; sends x-api-key header)POST /sdk-events (batches events; body { apiKey, events: [...] })POST /sdk-logs (batches logs; body { apiKey, logs: [...] })The repository includes a sample Compose Multiplatform app demonstrating the library's features. To run it:
composeApp configurationsample/iosApp/iosApp.xcodeproj in Xcode and runA Kotlin Multiplatform library for managing remote configuration, event tracking, and logging in your mobile applications.
Add the dependency to your build.gradle.kts:
// For multiplatform projects
sourceSets {
commonMain {
dependencies {
implementation("com.haumealabs:haumea-kmp:1.1.0")
}
}
}
// For Android-only projects
implementation("com.haumealabs:haumea-kmp:1.1.0")Note: CocoaPods integration is not required; consume the KMP artifact directly in your shared module.
import com.haumealabs.haumea.HaumeaClient
// Initialize the client with required parameters
val haumeaClient = HaumeaClient(
apiKey = "your-api-key",
appId = "your-app-id" // required by constructor; not used by the current backend
)
// Optionally set a custom user ID
haumeaClient.userId = "custom-user-id"// Fetch configuration (suspending)
val result = haumeaClient.fetchConfig()
result.onSuccess { config ->
val featureEnabled = config["feature_flag"]?.toBoolean() ?: false
}.onFailure { error ->
// Handle error
}
// Or observe configuration changes
haumeaClient.configState.collect { config ->
config?.let {
// React to config changes
}
}// Track an event
haumeaClient.addEvent(
eventName = "button_click",
params = mapOf(
"button_name" to "submit",
"screen" to "home"
),
onSuccess = { /* sent */ },
onError = { /* handle */ }
)// Send a log with severity
haumeaClient.addLog(
severity = "info", // recommended: "debug", "info", "warn", "error"
message = "User completed onboarding",
onSuccess = { /* sent */ },
onError = { /* handle */ }
)// Don't forget to close the client when done
haumeaClient.close()All network operations are non-blocking and include error callbacks. Common error cases include:
https://tgkcqvkyxpephsbhrkqm.functions.supabase.co
GET /sdk-flags (reads remote flags; sends x-api-key header)POST /sdk-events (batches events; body { apiKey, events: [...] })POST /sdk-logs (batches logs; body { apiKey, logs: [...] })The repository includes a sample Compose Multiplatform app demonstrating the library's features. To run it:
composeApp configurationsample/iosApp/iosApp.xcodeproj in Xcode and run