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:
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
} build.gradle.kts (app module):
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():
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).
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:
FeedbackJar.submit(userText) { result ->
result.onSuccess { response -> /* ... */ }
result.onFailure { error -> /* ... */ }
} List feedback
Fetch the public feedback feed with optional pagination:
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
| Method | Description |
|---|---|
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.