At Video SDK, weβre building tools to help companies create world-class collaborative products with capabilities for live audio/video, cloud recordings, RTMP/HLS streaming, and interaction APIs.
π₯³ Get 10,000 minutes free every month! Try it now!
- π± Demo App
- β‘ Quick Setup
- π§ Prerequisites
- π¦ Running the Sample App
- π₯ Meeting Features
- π§ Key Concepts
- π Token Generation
- 𧩠Project OverView
- π Examples
- π VideoSDK's Documentation
- π¬ Join Our Community
π± Download the sample Android app here: https://appdistribution.firebase.dev/i/99ae2c5db3a7e446
- Development environment requirements:
- Java Development Kit
- Android Studio 3.0 or later
- A physical or virtual mobile device running Android 5.0 or later
- Valid Video SDK Account
Clone the repository to your local environment.
git clone https://github.com/videosdk-live/videosdk-rtc-android-kotlin-sdk-example.git
Open the cloned project in Android Studio and perform a project sync.
Generate a temporary token from your Video SDK Account and update the local.properties
file:
auth_token = TEMPORARY-TOKEN
Run the Android app by pressing Shift+F10 or by clicking the βΆ Run button in the Android Studio toolbar.
Unlock a suite of powerful features to enhance your meetings:
Feature | Documentation | Description |
---|---|---|
π Precall Setup | Setup Precall | Configure audio, video devices, and other settings before joining the meeting. |
π€ Join Meeting | Join Meeting | Allows participants to join a meeting. |
πͺ Leave Meeting | Leave Meeting | Allows participants to leave a meeting. |
π€ Toggle Mic | Mic Control | Toggle the microphone on or off during a meeting. |
π· Toggle Camera | Camera Control | Turn the video camera on or off during a meeting. |
π₯οΈ Screen Share | Screen Share | Share your screen with other participants during the call. |
π Change Audio Device | Switch Audio Device | Select an input-output device for audio during a meeting. |
π Change Video Device | Switch Video Device | Select an output device for audio during a meeting. |
βοΈ Optimize Audio Track | Audio Track Optimization | Enhance the quality and performance of media tracks. |
βοΈ Optimize Video Track | Video Track Optimization | Enhance the quality and performance of media tracks. |
π¬ Chat | In-Meeting Chat | Exchange messages with participants through a Publish-Subscribe mechanism. |
πΈ Image Capture | Image Capturer | Capture images of other participant from their video stream, particularly useful for Video KYC and identity verification scenarios. |
π File Sharing | File Sharing | Share files with participants during the meeting. |
πΌοΈ Virtual Background | Virtual Background | Add a virtual background or blur effect to your video during the call. |
πΌ Recording | Recording | Record the meeting for future reference. |
π‘ RTMP Livestream | RTMP Livestream | Stream the meeting live to platforms like YouTube or Facebook. |
π Real-time Transcription | Real-time Transcription | Generate real-time transcriptions of the meeting. |
π Toggle Remote Media | Remote Media Control | Control the microphone or camera of remote participants. |
π« Mute All Participants | Mute All | Mute all participants simultaneously during the call. |
ποΈ Remove Participant | Remove Participant | Eject a participant from the meeting. |
Understand the core components of our SDK:
-
Meeting
- A Meeting represents Real-time audio and video communication.Note: Don't confuse the terms Room and Meeting; both mean the same thing π
-
Sessions
- A particular duration you spend in a given meeting is referred as a session, you can have multiple sessions of a specific meetingId. -
Participant
- A participant refers to anyone attending the meeting session. Thelocal participant
represents yourself (You), while all other attendees are consideredremote participants
. -
Stream
- A stream refers to video or audio media content published by either thelocal participant
orremote participants
.
The token is used to create and validate a meeting using API and also initialize a meeting.
π οΈ Development Environment
:
- You may use a temporary token for development. To create a temporary token, go to VideoSDK's dashboard .
π Production Environment
:
- You must set up an authentication server to authorize users for production. To set up an authentication server, please take a look at our official example repositories. videosdk-rtc-api-server-examples
-
One-to-One meeting - The One-to-One meeting allows 2 participants to join a meeting in the app.
-
Group Meeting - The Group meeting allows any number of participants to join a meeting in the app.
-
One-to-One meeting - The One-to-One meeting allows 2 participants to join a meeting in the app.
-
Group Meeting - The Group meeting allows any number of participants to join a meeting in the app.
- We have created 3 package screens and widgets in the following folder structure:
OneToOneCall
- It includes all classes/files related to OneToOne meetings.GroupCall
- It includes all classes/files related to the Group meetings.Common
- It includes all the classes/files that are used in both meeting type.
-
DeviceAdapter.kt : This is a custom
RecyclerView.Adapter
used to display a list of audio devices. It takes a list of devices and a click listener to handle item clicks. Each item shows the device name and an icon. -
bottom_sheet.xml : This layout defines the structure of the bottom sheet dialog, which contains a
RecyclerView
that displays the list of items. TheRecyclerView
fills the available space and referenceslist_items_bottom_sheet
for its individual list items. -
list_items_bottom_sheet.xml : This layout defines how each item in the bottom sheet looks. It contains a
LinearLayout
with anImageView
for the device icon, aTextView
for the device label, and anotherImageView
for a checkmark icon. The checkmark is used to indicate the currently selected device.
-
NetworkUtils.kt
- This class is used to call the API to generate a token, create and validate the meeting. -
CreateOrJoinActivity.kt
andactivity_create_or_join.xml
: This Activity allows users to either create or join a meeting. It manages microphone and webcam permissions and handles UI interactions like enabling/disabling audio and video. It also switches between theCreateMeetingFragment
andJoinMeetingFragment
, depending on user actions. -
CreateOrJoinFragment.kt
andfragment_createorjoin.xml
: This fragment provides two buttons for users to either create or join a meeting. On button clicks, it transitions to the respective fragments (CreateMeetingFragment
orJoinMeetingFragment
) withinCreateOrJoinActivity
. -
CreateMeetingFragment.kt
andfragment_create_meeting.xml
: This fragment enables users to create a new meeting by selecting a meeting type (e.g., One-to-One or Group Call) and entering their name. Upon submission, it makes a network request to create a meeting and navigates to the relevant meeting activity. -
JoinMeetingFragment.kt
andfragment_join_meeting.xml
: This fragment allows users to join an existing meeting by entering a valid meeting ID and their name. It validates input and, on success, navigates to the appropriate meeting activity based on the selected meeting type.
-
AudioDeviceListAdapter.kt
: This is a customArrayAdapter
that displays a list of audio devices in a dialog. It uses aListItem
model to represent each audio device. The layout for each list item is defined inaudio_device_list_layout.xml
. -
ListItem.kt
: This class represents an individual list item (audio device) with properties such as the device name, icon, and a description, and a boolean indicating whether the item is selected. -
audio_device_list_layout.xml
: This layout defines the appearance of each audio device in the list.
-
MessageAdapter.kt ; This is a custom
RecyclerView.Adapter
for displaying chat messages in a meeting. -
item_message_list.xml : This layout defines the structure of each chat message in the list. It displays the sender's name, the message, and the message timestamp.
-
ParticipantListAdapter.kt : This adapter displays the list of meeting participants in a
RecyclerView
. It includes the local user and updates in real-time as participants join or leave the meeting. -
layout_participants_list_view.xml : This layout defines the structure for the participant's list view. It includes a
RecyclerView
that lists each participant using the item_participant_list_layout. -
item_participant_list_layout.xml : This layout defines the appearance of each participant in the list. It displays the participantβs name, microphone, and camera status.
OneToOneCallActivity.kt
:OneToOneCallActivity.java
handles one-on-one video call, providing features like microphone and camera control, screen sharing, and participant management. It supports real-time chat and meeting event listeners for tasks like recording and screen sharing. The activity also displays session elapsed time and handles permissions for audio, video, and screen sharing.
GroupCallActivity.kt
: TheGroupCallActivity
class manages the main UI and logic for initiating and maintaining a group video call. It serves as the primary activity where users can join a video call session, toggle mic and camera. It also manages the video grid where all participants are displayed usingParticipantViewFragment
andParticipantViewAdapter
.ParticipantViewFragment.kt
: Displays an individual participant's video feed and controls within a fragment, updating the UI based on participant state changes.ParticipantViewAdapter.kt
: Binds participant data to aRecyclerView
, dynamically updating the video grid as participants join, leave, or change state.ParticipantChangeListener.kt
: Listens for participant-related events (join, leave, state changes) and triggers UI updates.ParticipantState.kt
: Represents the current state of a participant, such as mute and video status, for UI display and logic handling.
- Prebuilt Example
- JavaScript SDK Example
- React SDK Example
- React Native SDK Example
- Flutter SDK Example
- Android Java SDK Example
- iOS SDK Example
Explore more and start building with our Documentation