FeedbackJar

Android (Kotlin)

The FeedbackJar Android SDK lets you submit feedback and list public posts from native Android apps. You build your own form — the SDK handles submission with device metadata attached.

  • Coordinates: com.feedbackjar:sdk
  • Min SDK: 21 (Android 5.0)
  • Repository: Maven Central

Installation

Add Maven Central (most projects already have it) and the dependency.

settings.gradle.kts:

kotlin
dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
    }
}

build.gradle.kts (app module):

kotlin
dependencies {
    implementation("com.feedbackjar:sdk:1.0.0")
}

The SDK declares the INTERNET permission itself — nothing to add to your manifest.

Setup

Initialize once before use — typically in your Application.onCreate():

kotlin
import com.feedbackjar.sdk.FeedbackJar

class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()
        FeedbackJar.init(this, "your-widget-id")
    }
}

Get your widget ID from Settings → Widgets in your FeedbackJar workspace.

Submit feedback

Submissions are anonymous. Each submission automatically includes device metadata (Android version, device model, screen size, app version, locale).

kotlin
lifecycleScope.launch {
    val result = FeedbackJar.submit(userText)
    result
        .onSuccess { response ->
            Log.d("FeedbackJar", "Submitted: ${response.postId}")
        }
        .onFailure { error ->
            Log.e("FeedbackJar", "Failed to submit", error)
        }
}

A callback variant is available when you are not using coroutines:

kotlin
FeedbackJar.submit(userText) { result ->
    result.onSuccess { response -> /* ... */ }
    result.onFailure { error -> /* ... */ }
}

List feedback

Fetch the public feedback feed with optional pagination:

kotlin
lifecycleScope.launch {
    val result = FeedbackJar.listFeedback(limit = 20)
    result.onSuccess { page ->
        page.posts.forEach { post ->
            println("${post.title} — ${post.upvotes} upvotes")
        }
    }
}

Pass boardId to filter by board, or cursor for pagination.

API reference

MethodDescription
init(context, widgetId)Initialize the SDK. Call once before anything else.
suspend submit(content)Submit anonymous feedback. Returns Result<FeedbackResponse>.
suspend listFeedback(boardId?, limit?, cursor?)List public feedback. limit is clamped to 1–50.

Notes

  • Only anonymous submission is supported — no user identity is sent.
  • The server rate-limits submissions (5 per 15 minutes per IP).
  • Private boards and non-public posts are never returned by listFeedback.