dev.mushimushi:mushi-android (Android)
Native Kotlin SDK: SensorManager shake detection, an AppCompatDialogFragment
bottom-sheet report UI, rage-tap and slow-screen detection, PII scrubbing, and a
file-backed offline queue.
Preview — not on Maven Central yet. Build it from
packages/android
with gradle publishToMavenLocal and add mavenLocal() to your repositories;
Quickstart → Android has the steps.
// app/build.gradle.kts — resolves from mavenLocal() after a local build
dependencies {
implementation("dev.mushimushi:mushi-android:0.4.0")
}API surface
| Method | Purpose |
|---|---|
Mushi.init(application, MushiConfig(...)) | Boot the SDK — call once in Application.onCreate() |
Mushi.report(description, category, metadata) | Submit a report from code, no UI |
Mushi.captureError(throwable, metadata) | Report a caught Throwable with its name, message and stack |
Mushi.showWidget(category, metadata) | Present the bottom-sheet widget (needs a FragmentActivity) |
Mushi.setUser(map) | Attach app user identity to subsequent reports |
Mushi.setMetadata(key, value) | Attach or clear a metadata key on subsequent reports |
Mushi.addBreadcrumb(...) | Add to the 50-entry breadcrumb ring buffer |
Mushi.attachTo(view) | Open the widget when a View is clicked |
Setup
MushiConfig requires projectId, apiKey and endpoint. Everything else
has a default.
// MyApplication.kt
import android.app.Application
import dev.mushimushi.sdk.Mushi
import dev.mushimushi.sdk.config.MushiConfig
import dev.mushimushi.sdk.config.TriggerMode
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
Mushi.init(this, MushiConfig(
projectId = "YOUR_PROJECT_ID",
apiKey = "mushi_...",
endpoint = "https://dxptnwrhwsqckaftyymj.supabase.co/functions/v1/api",
triggerMode = TriggerMode.SHAKE, // SHAKE | BUTTON | BOTH | NONE
))
}
}Identifying users
// After sign-in
Mushi.setUser(mapOf("id" to user.id, "email" to user.email))Offline queue
Reports that fail to send are appended to filesDir/mushi/queue.ndjson,
capped by offlineQueueMaxBytes (default 2 MB), and flushed on a timer and
when the network comes back.
Sentry bridge
import dev.mushimushi.sdk.sentry.MushiSentryBridge
MushiSentryBridge.install()Call it after initialising Sentry. The bridge finds Sentry by reflection, so
apps without io.sentry:sentry-android pay nothing and it silently does
nothing.