{"id":21213905,"url":"https://github.com/videosdk-live/videosdk-rtc-android-java-sdk-example","last_synced_at":"2026-02-16T01:09:27.003Z","repository":{"id":37418861,"uuid":"392229910","full_name":"videosdk-live/videosdk-rtc-android-java-sdk-example","owner":"videosdk-live","description":"WebRTC based video conferencing SDK for Android (Java)","archived":false,"fork":false,"pushed_at":"2024-11-08T09:46:34.000Z","size":31730,"stargazers_count":17,"open_issues_count":5,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-08T10:35:43.032Z","etag":null,"topics":["android","android-sdk","chat","communication","end-to-end-encryption","java","kotlin-android","realtime","sdk","video","video-calling-app","webrtc"],"latest_commit_sha":null,"homepage":"https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/getting-started","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/videosdk-live.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-03T07:29:40.000Z","updated_at":"2024-11-08T09:46:38.000Z","dependencies_parsed_at":"2024-03-12T11:48:55.103Z","dependency_job_id":"56b4c37e-8510-482e-9374-4c3463dd7bb2","html_url":"https://github.com/videosdk-live/videosdk-rtc-android-java-sdk-example","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videosdk-live%2Fvideosdk-rtc-android-java-sdk-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videosdk-live%2Fvideosdk-rtc-android-java-sdk-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videosdk-live%2Fvideosdk-rtc-android-java-sdk-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videosdk-live%2Fvideosdk-rtc-android-java-sdk-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/videosdk-live","download_url":"https://codeload.github.com/videosdk-live/videosdk-rtc-android-java-sdk-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225631171,"owners_count":17499558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-sdk","chat","communication","end-to-end-encryption","java","kotlin-android","realtime","sdk","video","video-calling-app","webrtc"],"created_at":"2024-11-20T21:24:40.151Z","updated_at":"2026-02-16T01:09:26.975Z","avatar_url":"https://github.com/videosdk-live.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Video SDK for Android\n\n[![Documentation](https://img.shields.io/badge/Read-Documentation-blue)](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/concept-and-architecture)\n[![Firebase](https://img.shields.io/badge/Download%20Android-Firebase-green)](https://appdistribution.firebase.dev/i/99ae2c5db3a7e446)\n[![Discord](https://img.shields.io/discord/876774498798551130?label=Join%20on%20Discord)](https://discord.gg/bGZtAbwvab)\n[![Register](https://img.shields.io/badge/Contact-Know%20More-blue)](https://app.videosdk.live/signup)\n\nAt 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.\n\n### 🥳 Get **10,000 minutes free** every month! **[Try it now!](https://app.videosdk.live/signup)**\n\n### ⚡️From Clone to Launch - Get Started with the Example in 5 mins!\n\n[![Java](https://cdn.videosdk.live/docs/images/youtube/Java.png)](https://youtu.be/ihF3vhKuPhk?si=64FmEMweWpzst99h \"Java\")\n\n## 📚 **Table of Contents**\n\n- [📱 **Demo App**](#-demo-app)\n- [⚡ **Quick Setup**](#-quick-setup)\n- [🔧 **Prerequisites**](#-prerequisites)\n- [📦 **Running the Sample App**](#-running-the-sample-app)\n- [🔥 **Meeting Features**](#-meeting-features)\n- [🧠 **Key Concepts**](#-key-concepts)\n- [🔑 **Token Generation**](#-token-generation)\n- [🧩 **Project OverView**](#-project-overview)\n- [📖 **Examples**](#-examples)\n- [📝 **VideoSDK's Documentation**](#-documentation)\n- [💬 **Join Our Community**](#-join-our-community)\n\n## 📱 Demo App\n\n📱 Download the sample Android app here: https://appdistribution.firebase.dev/i/99ae2c5db3a7e446\n\n## ⚡ Quick Setup\n\n1. Sign up on [VideoSDK](https://app.videosdk.live/) to grab your API Key and Secret.\n2. Familiarize yourself with [Token](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/authentication-and-token)\n\n## 🛠 Prerequisites\n\n- Development environment requirements:\n  - [Java Development Kit](https://www.oracle.com/java/technologies/downloads/)\n  - Android Studio 3.0 or later\n- A physical or virtual mobile device running Android 5.0 or later\n- Valid [Video SDK Account](https://app.videosdk.live/)\n\n\n## 📦 Running the Sample App\n\n### Step 1: Clone the Repository\n\nClone the repository to your local environment.\n\n```js\ngit clone https://github.com/videosdk-live/videosdk-rtc-android-java-sdk-example.git\n```\n\n### Step 2: Open and Sync the Project\n\nOpen the cloned project in Android Studio and perform a project sync.\n\n### Step 3: Modify local.properties\n\nGenerate a temporary token from your [**Video SDK Account**](https://app.videosdk.live/signup) and update the `local.properties` file:\n\n```js title=\"local.properties\"\nauth_token = TEMPORARY-TOKEN\n```\n\n### Step 4: Run the sample app\n\nRun the Android app by pressing Shift+F10 or by clicking the ▶ Run button in the Android Studio toolbar.\n\n## 🔥 Meeting Features\n\nUnlock a suite of powerful features to enhance your meetings:\n\n| Feature                        | Documentation                                                                                                                | Description                                                                                                      |\n|--------------------------------|------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|\n| 📋 **Precall Setup**           | [Setup Precall](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/setup-call/precall)                   | Configure audio, video devices, and other settings before joining the meeting.                                              |\n| 🤝 **Join Meeting**            | [Join Meeting](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/setup-call/join-meeting)                | Allows participants to join a meeting.                                                                 |\n| 🚪 **Leave Meeting**            | [Leave Meeting](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/setup-call/leave-end-meeting)                | Allows participants to leave a meeting.                                                                 |\n| 🎤 **Toggle Mic**         | [Mic Control](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/handling-media/mute-unmute-mic)          | Toggle the microphone on or off during a meeting.                                                                  |\n| 📷 **Toggle Camera**           | [Camera Control](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/handling-media/on-off-camera)         | Turn the video camera on or off during a meeting.                                                                  |\n| 🖥️ **Screen Share**            | [Screen Share](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/handling-media/screen-share)          | Share your screen with other participants during the call.                                                      |\n| 🔊 **Change Audio Device**     | [Switch Audio Device](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/handling-media/change-input-output-device#changing-inputoutput-audio-device) | Select an input-output device for audio during a meeting.                                                                |\n| 🔌 **Change Video Device**     | [Switch Video Device](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/handling-media/change-input-output-device#changing-camera-input-device) | Select an output device for audio during a meeting.                                                                |\n| ⚙️ **Optimize Audio Track**         | [Audio Track Optimization](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/render-media/optimize-audio-track)                                       | Enhance the quality and performance of media tracks.                                                            |\n| ⚙️ **Optimize Video Track**         | [Video Track Optimization](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/render-media/optimize-video-track)                                       | Enhance the quality and performance of media tracks.                                                            |\n| 💬 **Chat**                    | [In-Meeting Chat](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/collaboration-in-meeting/pubsub)      | Exchange messages with participants through a Publish-Subscribe mechanism.                                                   |\n| 📸 **Image Capture**           | [Image Capturer](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/handling-media/image-capturer)        | Capture images of other participant from their video stream, particularly useful for Video KYC and identity verification scenarios.     |\n| 📁 **File Sharing**            | [File Sharing](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/collaboration-in-meeting/upload-fetch-temporary-file) | Share files with participants during the meeting.                                                               |\n| 🖼️ **Virtual Background**        | [Virtual Background](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/render-media/virtual-background)                                       | Add a virtual background or blur effect to your video during the call.                                                            |\n| 📼 **Recording**               | [Recording](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/recording/Overview)                | Record the meeting for future reference.                                                                        |\n| 📡 **RTMP Livestream**         | [RTMP Livestream](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/live-streaming/rtmp-livestream)        | Stream the meeting live to platforms like YouTube or Facebook.                                                  |\n| 📝 **Real-time Transcription**           | [Real-time Transcription](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/transcription-and-summary/realtime-transcribe-meeting) | Generate real-time transcriptions of the meeting.                                                               |\n| 🔇 **Toggle Remote Media**     | [Remote Media Control](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/control-remote-participant/remote-participant-media) | Control the microphone or camera of remote participants.                                                        |\n| 🚫 **Mute All Participants**   | [Mute All](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/control-remote-participant/mute-all-participants) | Mute all participants simultaneously during the call.                                                           |\n| 🗑️ **Remove Participant**      | [Remove Participant](https://docs.videosdk.live/android/guide/video-and-audio-calling-api-sdk/control-remote-participant/remove-participant) | Eject a participant from the meeting.  |\n\n## 🧠 Key Concepts\n\nUnderstand the core components of our SDK:\n\n- `Meeting` - A Meeting represents Real-time audio and video communication.\n\n  **` Note: Don't confuse the terms Room and Meeting; both mean the same thing 😃`**\n\n- `Sessions` - A particular duration you spend in a given meeting is referred as a session, you can have multiple sessions of a specific meetingId.\n- `Participant` - A participant refers to anyone attending the meeting session. The `local participant` represents yourself (You), while all other attendees are considered `remote participants`.\n- `Stream` - A stream refers to video or audio media content published by either the `local participant` or `remote participants`.\n\n\n## 🔐 Token Generation\n\nThe token is used to create and validate a meeting using API and also initialize a meeting.\n\n🛠️ `Development Environment`:\n\n- You may use a temporary token for development. To create a temporary token, go to VideoSDK's [dashboard](https://app.videosdk.live/api-keys) .\n\n🌐 `Production Environment`:\n\n- 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](https://github.com/videosdk-live/videosdk-rtc-api-server-examples)\n\n## 🧩 Project Overview\n\n### App Behaviour with Different Meeting Types\n\n- **One-to-One meeting** - The One-to-One meeting allows 2 participants to join a meeting in the app.\n\n- **Group Meeting** - The Group meeting allows any number of participants to join a meeting in the app.\n\n## 🏗️ Project Structure\n\n- We have created 3 package screens and widgets in the following folder structure:\n  - [`OneToOneCall`](app/src/main/java/live/videosdk/rtc/android/java/OneToOneCall) - It includes all classes/files related to OneToOne meetings.\n  - [`GroupCall`](app/src/main/java/live/videosdk/rtc/android/java/GroupCall) - It includes all classes/files related to the Group meetings.\n  - [`Common`](app/src/main/java/live/videosdk/rtc/android/java/Common) - It includes all the classes/files that are used in both meeting type.\n\n### [Common package](app/src/main/java/live/videosdk/rtc/android/java/Common)\n\n### 1. Pre-Call Setup on Join Screen\n\n- [DeviceAdapter.java](app/src/main/java/live/videosdk/rtc/android/java/Common/Adapter/DeviceAdapter.java) : 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.\n\n- [bottom_sheet.xml](app/src/main/res/layout/bottom_sheet.xml) : This layout defines the structure of the bottom sheet dialog, which contains a `RecyclerView` that displays the list of items. The `RecyclerView` fills the available space and references `list_items_bottom_sheet` for its individual list items.\n\n- [list_items_bottom_sheet.xml](app/src/main/res/layout/list_items_bottom_sheet.xml) : This layout defines how each item in the bottom sheet looks. It contains a `LinearLayout` with an `ImageView` for the device icon, a `TextView` for the device label, and another `ImageView` for a checkmark icon. The checkmark is used to indicate the currently selected device.\n\n\u003cp align=\"center\"\u003e\n\u003cimg width=\"300\" src=\"assets/precall_screen.gif\"/\u003e\n\u003c/p\u003e\n\n### 2. Create or Join Meeting\n\n- [`NetworkUtils.java`](app/src/main/java/live/videosdk/rtc/android/java/Common/Utils/NetworkUtils.java) - This class is used to call the API to generate a token, create and validate the meeting.\n\n- [`CreateOrJoinActivity.java`](app/src/main/java/live/videosdk/rtc/android/java/Common/Activity/CreateOrJoinActivity.java) and [`activity_create_or_join.xml`](app/src/main/res/layout/activity_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 the `CreateMeetingFragment` and `JoinMeetingFragment`, depending on user actions.\n\n- [`CreateOrJoinFragment.java`](app/src/main/java/live/videosdk/rtc/android/java/Common/fragment/CreateOrJoinFragment.java) and [`fragment_createorjoin.xml`](app/src/main/res/layout/fragment_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` or `JoinMeetingFragment`) within `CreateOrJoinActivity`.\n\n- [`CreateMeetingFragment.java`](app/src/main/java/live/videosdk/rtc/android/java/Common/fragment/CreateMeetingFragment.java) and [`fragment_create_meeting.xml`](app/src/main/res/layout/fragment_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.\n\n- [`JoinMeetingFragment.java`](app/src/main/java/live/videosdk/rtc/android/java/Common/fragment/JoinMeetingFragment.java) and [`fragment_join_meeting.xml`](app/src/main/res/layout/fragment_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.\n\n\u003cp align=\"center\"\u003e\n\u003cimg width=\"300\" src=\"assets/create_meeting.gif\"/\u003e\n\u003c/p\u003e\n\n### 3. Switch AudioDevice\n\n- [`AudioDeviceListAdapter.java`](app/src/main/java/live/videosdk/rtc/android/java/Common/Adapter/AudioDeviceListAdapter.java) : This is a custom `ArrayAdapter` that displays a list of audio devices in a dialog. It uses a `ListItem` model to represent each audio device. The layout for each list item is defined in `audio_device_list_layout.xml`.\n\n- [`ListItem.java`](app/src/main/java/live/videosdk/rtc/android/java/Common/Modal/ListItem.java) : 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.\n\n- [`audio_device_list_layout.xml`](app/src/main/res/layout/audio_device_list_layout.xml) : This layout defines the appearance of each audio device in the list.\n\n\u003cp align=\"center\"\u003e\n\u003cimg width=\"300\" src=\"assets/mic_output_device.gif\"/\u003e\n\u003c/p\u003e\n\n### 4. Chat\n\n- [MessageAdapter.java](app/src/main/java/live/videosdk/rtc/android/java/Common/Adapter/MessageAdapter.java) ; This is a custom `RecyclerView.Adapter` for displaying chat messages in a meeting.\n\n- [item_message_list.xml](app/src/main/res/layout/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.\n\n\u003cp align=\"center\"\u003e\n\u003cimg width=\"300\" src=\"assets/chat_view.gif\"/\u003e\n\u003c/p\u003e\n\n### 5. ParticipantList\n\n- [ParticipantListAdapter.java](app/src/main/java/live/videosdk/rtc/android/java/Common/Adapter/ParticipantListAdapter.java) : 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.\n\n- [layout_participants_list_view.xml](app/src/main/res/layout/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.\n\n- [item_participant_list_layout.xml](app/src/main/res/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.\n\n\u003cp align=\"center\"\u003e\n\u003cimg width=\"300\" src=\"assets/participant_list.gif\"/\u003e\n\u003c/p\u003e\n\n### [OneToOneCall package](app/src/main/java/live/videosdk/rtc/android/java/OneToOneCall)\n\n- [`OneToOneCallActivity.java`](app/src/main/java/live/videosdk/rtc/android/java/OneToOneCall/OneToOneCallActivity.java) : `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.\n\n### [GroupCall package](app/src/main/java/live/videosdk/rtc/android/java/GroupCall)\n\n- [`GroupCallActivity.java`](app/src/main/java/live/videosdk/rtc/android/java/GroupCall/Activity/GroupCallActivity.java) : The `GroupCallActivity` 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 using `ParticipantViewFragment` and `ParticipantViewAdapter`.\n- [`ParticipantViewFragment.java`](app/src/main/java/live/videosdk/rtc/android/java/GroupCall/Fragement/ParticipantViewFragment.java) : Displays an individual participant's video feed and controls within a fragment, updating the UI based on participant state changes.\n- [`ParticipantViewAdapter.java`](app/src/main/java/live/videosdk/rtc/android/java/GroupCall/Adapter/ParticipantViewAdapter.java) : Binds participant data to a `RecyclerView`, dynamically updating the video grid as participants join, leave, or change state.\n- [`ParticipantChangeListener.java`](app/src/main/java/live/videosdk/rtc/android/java/GroupCall/Listener/ParticipantChangeListener.java) : Listens for participant-related events (join, leave, state changes) and triggers UI updates.\n- [`ParticipantState.java`](app/src/main/java/live/videosdk/rtc/android/java/GroupCall/Utils/ParticipantState.java) : Represents the current state of a participant, such as mute and video status, for UI display and logic handling.\n\n## 📖 Examples\n\n- [**Prebuilt Example**](https://github.com/videosdk-live/videosdk-rtc-prebuilt-examples)\n- [**JavaScript SDK Example**](https://github.com/videosdk-live/videosdk-rtc-javascript-sdk-example)\n- [**React SDK Example**](https://github.com/videosdk-live/videosdk-rtc-react-sdk-example)\n- [**React Native SDK Example**](https://github.com/videosdk-live/videosdk-rtc-react-native-sdk-example)\n- [**Flutter SDK Example**](https://github.com/videosdk-live/videosdk-rtc-flutter-sdk-example)\n- [**Android Kotlin SDK Example**](https://github.com/videosdk-live/videosdk-rtc-android-kotlin-sdk-example)\n- [**iOS SDK Example**](https://github.com/videosdk-live/videosdk-rtc-ios-sdk-example)\n\n\n## 📝 Documentation\n\nExplore more and start building with our [**Documentation**](https://docs.videosdk.live/)\n\n## 🤝 Join Our Community\n\n- **[Discord](https://discord.gg/Gpmj6eCq5u)**: Engage with the Video SDK community, ask questions, and share insights.\n- **[X](https://x.com/video_sdk)**: Stay updated with the latest news, updates, and tips from Video SDK.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvideosdk-live%2Fvideosdk-rtc-android-java-sdk-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvideosdk-live%2Fvideosdk-rtc-android-java-sdk-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvideosdk-live%2Fvideosdk-rtc-android-java-sdk-example/lists"}