Android Host Dashboard Tutorial
Build a host-led conference with com.mediasfu:mediasfu-sdk-android@1.0.5. Create a new Android Studio app, then add the dependency and the two small Compose files below. The supplied room provides pre-join, local and remote media, participant state, room controls, and normal leave.
Prerequisites
- Android Studio, JDK 17, and an Android device or emulator with Android 7.0 (API 24) or newer.
- Camera and microphone permissions in the app manifest.
- For an isolated local test only, restricted credentials in the developer's uncommitted
~/.gradle/gradle.properties. A released Cloud app gets room authority from its authenticated backend; it never ships an account API key.
Project files
First copy the Android Complete Starter. It shows
where every Gradle, manifest, activity, and room file belongs. For this outcome,
choose Host dashboard in its picker; that mounts MediasfuConference.
app/build.gradle.kts:
dependencies {
implementation("com.mediasfu:mediasfu-sdk-android:1.0.5")
}
The starter's activity selects the outcome:
ScenarioRoom(ProductScenario.HOST_DASHBOARD)
The starter requests camera, microphone, and network access. Keep runtime permission prompts close to the user's attempt to turn on a device.
Run
From your Android app directory, build and install the app:
.\gradlew.bat installDebug
Choose Host Dashboard in the scenario picker. On the supplied pre-join screen, grant camera and microphone access, then create or join the room. For production, replace the local-only development credential configuration with your authenticated backend's approved room-entry flow before distributing the app.
Expected result
You see the supplied MediasfuConference pre-join and room experience. Turn on the microphone or camera, join a second participant, verify their media and participant entry, then leave through the supplied room control.
Recovery
If camera or microphone does not start, check Android's app permissions and retry the selected device action. If room entry fails, preserve the current screen, explain that the entry request did not complete, and ask the app backend for a fresh authorized entry. Do not retry a Cloud request with a key stored in the app.
Cleanup
Leave through the room's exit control. Then clear any app-owned selected-room state, observers, timers, notifications, and cached backend entry data. Require a fresh backend authorization before a later room entry.