Kotlin
Adjusting the sample app UI
The Android SDK exposes the video streams (both published and subscribed) as View objects. You can attach these views to any composable view in your layout.
- Create a composable view
In Android Studio:
- Create a new file
VideoChatScreen.kt - Fill contents of the file with:
- Now declare
publisherViewandsubscriberViewas properties of the MainActivity class (right after the declaration for thesessionproperty):
private var publisherView by mutableStateOf<View?>(null)
private var subscriberView by mutableStateOf<View?>(null)
- Finally, in the existing
onCreate()method, initialize theVideoChatScreenview by adding it via thesetContent()method call:
Basic video chat
Learn the basic concepts of the Vonage Video API platform, including how users can communicate through video, voice, and messaging. Explore a basic Vonage Video API flow.
Steps
1
Introduction2
Getting Started3
Creating a new project4
Adding the Android SDK5
Setting up authentication6
Requesting permissions7
Connecting to the session8
Adjusting the sample app UI9
Publishing a stream to the session10
Subscribing to other client streams11
Running the app12
Conclusion