Skip to main content

Android Remote Podcast Tutorial

Build a broadcast room 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 Remote podcast in its picker; that mounts MediasfuBroadcast.

app/build.gradle.kts:

dependencies {
implementation("com.mediasfu:mediasfu-sdk-android:1.0.5")
}

The starter's activity selects the outcome:

ScenarioRoom(ProductScenario.REMOTE_PODCAST)

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 Remote Podcast 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 MediasfuBroadcast 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.