Developers
Kotlin / Android: quickstart
Install and first-use steps for sending events to Feralin with Kotlin / Android. Code samples come from the SDK's own README and statuses from the capability record.
Install
com.feralin:android 0.1.0 is published on Maven Central; install it with your package manager using the command below.
// settings.gradle.kts
include(":feralin")
project(":feralin").projectDir = file("../sdks/android/feralin")
// app/build.gradle.kts
dependencies { implementation(project(":feralin")) }class App : Application() {
override fun onCreate() {
super.onCreate()
Feralin.initialize(
this,
FeralinConfig(
projectKey = "pk_live_...", // yalnız x-feralin-project-key başlığında taşınır
collectUrl = "https://collect.example.com",
consent = kayitliKarar(), // karar yoksa null
),
)
}
}First use
Feralin.track("purchase", mapOf("amount" to 10.5))
Feralin.screen("home")
Feralin.identify("kullanici_42") // PII vermeyin
Feralin.flush { result -> /* HTTP durumu */ }
Feralin.reset() // çıkış: kimlikler yenilenir, kuyruk silinirFeralin.group("acct_42", mapOf("plan" to "pro")) // fr_group: group_id + özellikler (grup kimliği 1-128 karakter)
Feralin.setUserProperties(mapOf("tier" to "gold")) // fr_user_properties; geçerli özellik yoksa olay üretilmez
Feralin.setGlobalProperties(mapOf("app_theme" to "dark")) // sonraki her olaya eklenir (fr_ olayları hariç); birleştirir, null değer anahtarı siler
Feralin.clearGlobalProperties() // hepsini siler; reset() de silerFeralin.installIdentifier { installId ->
// installId'yi kendi sunucunuza iletin; sunucunuz gizli API anahtarıyla (attribution:link) çağırır:
// POST /v1/projects/{id}/attribution/account-links {"surface":"app","subject_id":installId,"account_ref":"<opak hesap kimliği>","platform":"android","consent":true}
}Feralin.consumeDeferredDeepLink { link ->
if (link.status == DeferredDeepLinkStatus.DELIVERED) router.open(link.path!!)
}Code samples are taken as they are from sdks/android/README.md; comments inside may be in Turkish. You create the project key in the dashboard.
Capabilities
| Capability | Status |
|---|---|
| Event sending | Supported |
| Batch sending | Partial |
| Consent handling | Supported |
| Identity | Supported |
| Attribution | Partial |
| Deep links | Partial |
| Revenue | Partial |
| Error capture | Partial |
| Session replay | Not applicable |
| Tracing | Planned |
Verification chain
| Link | Status |
|---|---|
| Source | Passed |
| Build | Passed |
| Test | Passed |
| Registry publication | Passed |
| Clean install | Passed |
| Event receipt | Passed |
| Documentation | Passed |
| Super Admin proof | Not started |
Passed means local evidence: source, build and tests ran. Registry publication and Super Admin proof are separate links; the SDK is not called ready until each has passed.