Enjoying the docs? Start building free, no credit card needed. Get started →
Docs / Android (Kotlin)

Mobile

Android (Kotlin)

Add a native feature request board to your Android app. It takes three steps.

Needs Android 6.0 (API 23) or later and Jetpack Compose with Material 3. Apps built with Views work too.

Install

  1. Add the dependency

    The SDK is on Maven Central, which your project already uses. Add one line:

    app/build.gradle.kts
    dependencies {    implementation("com.fewchurs:fewchurs-android:1.1.0")}
  2. Or use a version catalog

    If your project uses a version catalog, add the library there instead:

    gradle/libs.versions.toml
    [libraries]fewchurs = { module = "com.fewchurs:fewchurs-android", version = "1.1.0" }
    app/build.gradle.kts
    dependencies {    implementation(libs.fewchurs)}

Set up

Add your API key to AndroidManifest.xml, inside <application>. Every project has this file, and the SDK reads the key when your app starts. No code needed.

app/src/main/AndroidManifest.xml
<application    ...>    <meta-data        android:name="com.fewchurs.sdk.API_KEY"        android:value="fr_live_xxx" />    <activity android:name=".MainActivity" ... /></application>

Use the API key from your dashboard. A new project with only MainActivity is ready now.

Or set it up in code. Use this if you want to change settings, or your app already has an Application class. Call configure once, when your app starts:

MyApp.kt
import android.app.Applicationimport com.fewchurs.sdk.Fewchursclass MyApp : Application() {    override fun onCreate() {        super.onCreate()        Fewchurs.configure(this, apiKey = "fr_live_xxx")    }}

If you just made this class, register it in your manifest. Then remove the meta-data line, so the key is only in one place.

app/src/main/AndroidManifest.xml
<application    android:name=".MyApp"    ...>

Show the board

FewchursBoardSheet shows the board in a bottom sheet. It handles everything inside: the list, votes, comments and new requests.

SettingsScreen.kt
import androidx.compose.material3.Buttonimport androidx.compose.material3.Textimport androidx.compose.runtime.Composableimport androidx.compose.runtime.getValueimport androidx.compose.runtime.mutableStateOfimport androidx.compose.runtime.rememberimport androidx.compose.runtime.setValueimport com.fewchurs.sdk.ui.FewchursBoardSheet@Composablefun SettingsScreen() {    var showBoard by remember { mutableStateOf(false) }    Button(onClick = { showBoard = true }) {        Text("Suggest a feature")    }    FewchursBoardSheet(visible = showBoard, onDismiss = { showBoard = false })}

In a new project, call SettingsScreen() inside setContent in MainActivity.kt, or put the button on any screen you like.

To use it as a full screen or a navigation destination, use FewchursBoard.

import com.fewchurs.sdk.ui.FewchursBoardcomposable("feedback") {    FewchursBoard(onClose = { navController.popBackStack() })}

Using Views

If your app doesn't use Compose, open the board in its own screen from anywhere:

import com.fewchurs.sdk.FewchursFewchurs.showBoard(context)

Colors and theme

By default the board follows your app: your MaterialTheme colors, shapes and fonts, and light or dark mode. To change it, add a theme block to configure.

import com.fewchurs.sdk.ui.config.*Fewchurs.configure(this, apiKey = "fr_live_xxx") {    theme {        colors {            primary = Color(0xFFED5F18)        }        cornerRadius = 14.dp        darkMode = DarkMode.System    }}

The SDK README covers every option: copy, tabs, custom pieces of the board, and building your own UI on the headless API.

Kotlin Multiplatform

The SDK is for Android, so in a Kotlin Multiplatform project add it to androidMain, not commonMain. On iOS, use the Swift package.

shared/build.gradle.kts
kotlin {    sourceSets {        androidMain.dependencies {            implementation("com.fewchurs:fewchurs-android:1.1.0")        }    }}

About the API key

It's fine to put this key in your app. It can only do what the board does: list, vote, comment and suggest. It can't change your settings or read anything private.

The key only works in the apps you added in the dashboard. Your package name is the applicationId in app/build.gradle.kts. See find your app IDs.

The SDK gives each device a random ID and saves it on the device. That is how it remembers votes without an account. Read more in How it works.

What your plan changes

Your plan is applied on our servers, so you never need to change code or update the SDK when it changes.

FreeStarterPro
Requests the board listsFirst 5First 200All
"Powered by Fewchurs" lineShownHiddenHidden

Newer requests are still saved and show in your dashboard. A request someone just submitted appears on their board straight away, but once the app is past its limit it leaves the list on the next refresh. See pricing.