Skip to main content

Getting Started

Android

1. Add the dependency

Add the Fedo artifact to your build.gradle.kts:

dependencies {
implementation("com.getfedo:sdk-android:0.1.5")
}

2. Initialize the SDK

Call Fedo.initialize once, early in your app's startup - typically in Application.onCreate() or your launcher Activity.

import com.fedo.sdk.Fedo

class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
Fedo.initialize(
apiKey = "your-api-key-here"
)
}
}
warning

Fedo.initialize must be called before any other SDK method.

3. Set the current user

Before showing the feedback screen, identify the user:

Fedo.setUserID("user-123") // required
Fedo.setUserDisplayName("Jane Doe") // optional
Fedo.setUserEmail("jane@example.com") // optional
Fedo.setUserProperty("tier", "gold") // optional

Call setUserID whenever the user changes (login/logout). See User Management for details.

4. Add the feedback screen

Place FeedbacksScreen() inside your Compose UI hierarchy:

import androidx.compose.runtime.Composable
import com.fedo.sdk.ui.FeedbacksScreen

@Composable
fun MyScreen() {
FeedbacksScreen(
onDismiss = { /* return to previous screen in host app */ }
)
}

That's it. The SDK handles:

  • Feedback list with tabs (All / Mine)
  • Creating new feedback via FAB
  • Tapping a feedback item opens details with comments
  • Voting and commenting
  • Swipe-to-refresh

Integration example

5. Build and run

Run your app. You should see the feedback board rendered inside the composable slot you placed FeedbacksScreen() in.

Next steps