Android SDK 1.1.0
Install and use com.fahswe:fahswe-rtc:1.1.0 with real FsRtcEngine APIs.
Status
Android SDK 1.1.0 is in early access. The production platform it connects to (token API, signaling, encrypted SFU and TURN) is live; the SDK artifact is shared with early-access projects and is not yet published to a public Maven repository.
Installation
Early-access projects receive the AAR and a private Maven repository URL from Fah Swe (request access via https://fahswertc.com/contact). Add that repository and the dependency below; the coordinates stay the same when the SDK is published publicly.
repositories {
google()
mavenCentral()
// Early access: the repository URL you received from Fah Swe
maven(url = uri("<early-access-maven-url>"))
}
dependencies {
implementation("com.fahswe:fahswe-rtc:1.1.0")
}
Requirements
- minSdk as declared by the AAR
- ABIs: arm64-v8a, armeabi-v7a, x86_64 as packaged
- 16 KB page-size: follow AAR release notes
- Request mic/camera permissions only when needed
Join a room
Mint a short-lived token on your server. Never place App Secret in the Android app.
Call initialize() before joinRoom. Role must be FsRole (not a raw string).
Reject secret-like tokens (for example values starting with sk_).
import com.fahswe.rtc.FsRtcEngine
import com.fahswe.rtc.FsRole
val engine = FsRtcEngine(appId = appIdFromServer)
engine.initialize()
engine.joinRoom(
token = serverToken,
roomId = "room_demo",
userId = "user_42",
role = FsRole.Host,
mediaHost = null
)
Publish and subscribe
After join, publish or subscribe explicitly. video=true only when your app has camera permission and the plan includes video.
engine.startPublish(streamId = "cam1", audio = true, video = false)
engine.startSubscribe(streamId = "cam1")
Mute
Voice session mute via FsVoiceSession when using the voice session path.
import com.fahswe.rtc.FsVoiceSession
val voice: FsVoiceSession = /* from FsRtcClient.voiceSession() */
voice.mute(true)
Leave and destroy
leaveRoom ends the join. release() tears down native resources.
engine.leaveRoom()
engine.release()
Errors
Use FsErrorCodes such as FS_AUTH, FS_TOKEN_EXPIRED, FS_PERMISSION, FS_ROOM_CLOSED, FS_SEAT_CONFLICT, FS_RATE_LIMITED.
Security
- App Secret never ships in the APK
- Short-lived tokens
- Rotate credentials in Developer Console
Good to know
Seat flows are signaling HTTP, not FsRtcEngine methods.
Video PK and livestream remain coming later.
Source references
sdk/android/fahswe-rtcsdk/android/fahswe-rtc/src/main/java/com/fahswe/rtc/FsRtcEngine.kt