{issued}

Android

A Kotlin SDK that presents a native Android form. Supports the same field/theme model as every other SDK.

Install

In your module build.gradle:

gradle
dependencies {
    implementation "dev.issued:sdk:1.0.0"
}

Minimal embed

kotlin
import dev.issued.sdk.IssuedSDK
import dev.issued.sdk.WidgetConfig
import dev.issued.sdk.FieldConfig

val config = WidgetConfig(
    projectId = "your-project-id",
    fields = mapOf(
        "subject"     to FieldConfig(visible = true, required = true),
        "description" to FieldConfig(visible = true, required = true),
        "email"       to FieldConfig(visible = true, required = false)
    )
)

IssuedSDK.getInstance().showForm(
    activity = this,
    config = config,
    onSuccess = { result ->
        Log.d("Issued", "Submitted: ${result.ticketId}")
    },
    onError = { error ->
        Log.e("Issued", "Error: ${error.message}")
    }
)

Hidden metadata

kotlin
val fields = mapOf(
    "subject"     to FieldConfig(visible = true, required = true),
    "description" to FieldConfig(visible = true, required = true),
    "email"       to FieldConfig(visible = false, value = currentUser.email),
    "userId"      to FieldConfig(visible = false, value = currentUser.id),
    "appVersion"  to FieldConfig(
        visible = false,
        value = BuildConfig.VERSION_NAME
    )
)

Styling

kotlin
val theme = ThemeConfig(
    primaryColor = "#6366f1",
    backgroundColor = "#ffffff",
    textColor = "#1f2937",
    borderColor = "#d1d5db",
    cornerRadius = 8.0,
    fontFamily = "Roboto"
)

val config = WidgetConfig(
    projectId = "your-project-id",
    fields = fields,
    theme = theme
)

Gotchas

  • Your applicationIdmust appear in the project's allowlist (project edit page → Bundle IDs).
  • Needs <uses-permission android:name="android.permission.INTERNET" /> in your manifest (usually already present).
  • Pass the current Activity — the SDK launches a form Activity on top of it.
Next steps
Copy the Kotlin snippet with your project ID pre-filled.