colossal-manchester-31772
09/03/2025, 12:44 AMtall-airline-16756
09/03/2025, 12:44 AMtall-airline-16756
09/03/2025, 12:44 AMval room = LiveKit.create(applicationContext)
lifecycleScope.launch {
room.connect(url, token)
room.localParticipant.setMicrophoneEnabled(true)
room.localParticipant.setCameraEnabled(true)
}
Ending a Session:
room.disconnect()
Just a quick heads-up: don’t forget to swap out url and token with your actual LiveKit server URL and authentication token. Also, make sure you’ve got the necessary permissions (RECORD_AUDIO, CAMERA) sorted before you start. If you need a hand with anything else, I’m here for you!
Sources: sample-app-compose/src/main/java/io/livekit/android/composesample/CallActiv... | Android quickstart | LiveKit Docscolossal-manchester-31772
09/03/2025, 12:45 AMtall-airline-16756
09/03/2025, 12:45 AM@JvmStatic annotations to make sure everything integrates smoothly with your Java code.
We do recommend Kotlin because of its modern features and great support for coroutines (which we use a lot in the SDK), but if you’re more comfortable with Java, you can totally get the same functionality there as well.
Sources: livekit-android-sdk/src/main/java/io/livekit/android/room/participant/Local...