Android · Jetpack Compose · SDK 1.0.2
FAQs
Show published answers and provide an email support contact.
Prepare your content
Complete the Android quickstart and publish a FAQ in the dashboard.
Compose integration
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalContext
import dev.mobilejoe.ui.compose.faq.FaqHost
import dev.mobilejoe.ui.compose.faq.FaqUiConfiguration
@Composable
fun HelpScreen(onNavigateUp: () -> Unit) {
FaqHost(
configuration = FaqUiConfiguration(
context = LocalContext.current,
recipient = "support@example.com",
),
onNavigateUp = onNavigateUp,
)
}
Place this in HelpScreen.kt under your app package and call it from your existing Compose navigation destination inside your Material theme. The host provides its own list-to-detail navigation: the list shows only the question titles, and tapping one opens its answer. Pass an existing published FAQ ID as selectedFaqId to start at its detail.
Support configuration
Use your support address for recipient; optional subject and body prefill the email. The context constructor supplies localized support labels. The primary constructor accepts contactSupportMailToLabel and contactSupportHint for custom text. The support hint and email link appear below the list of questions and below each answer. Pass an empty recipient, or use FaqUiConfiguration(), to hide both.
Loading and refresh
The screen loads on creation, offers retry after a load error, and supports pull to refresh. For a custom UI, dev.mobilejoe.api.faq.Faqs exposes all and single flows and suspending load(), reload(), and load(id) methods. Run these in your lifecycle-owned coroutine and handle errors. Repeated load() calls append to the same collection; use reload() to replace it.
Verify
Check your published question and answer, then test the support action on a device with an email app. If loading fails or questions are missing, follow Troubleshooting.