Skip to content

A 1 to 1 video chat app using the Daily Client SDK for Android

License

Notifications You must be signed in to change notification settings

daily-demos/daily-android-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 

A video chat app using the Daily Client SDK for Android

This demo showcases a basic video chat app that uses Daily's native Android SDK mobile library.

Prerequisites

How the demo works

In the demo app, a user must enter a URL for a Daily Room, then press Join. The app will find the meeting room and join the call.

Most of the call related logic in the app can be found in the DemoCallService. This initializes a CallClient, which keeps track of important information about the meeting, like other participants (including their audio and video tracks) and the things they do on the call (e.g. muting their mic or leaving), and provides methods for interacting with the meeting. The app leverages this object to update its state accordingly, and to carry out user actions like muting or changing track-publishing statuses. When the user leaves the meeting room, the Call Client remains, but their call has ended. The Call Client is destroyed when the application exits.

When testing or running this demo, you'll likely use a room you've manually created for calls. A production application will likely need to use the Daily REST API to create rooms on the fly for your users, which necessitates the use of a sensitive Daily API key. You likely don't want to embed this key in a production app. We recommend running a web server and keeping sensitive things like API keys there instead.

This project is designed to work with rooms that have privacy set to public or private. When joining a private room, you must provide a valid token to access the room. At the moment, knocking for access is not supported, meaning that a token is always required when joining a private room.

Running locally

  1. Clone this repository locally, i.e.: git clone [email protected]:daily-demos/daily-android-demo.git
  2. Open the DailyDemo directory in Android Studio.
  3. Install dependencies by syncing your Android Studio project's gradle files using the Android Studio UI popups.
  4. Build the project.
  5. Run the project, either on a simulator (which will not have webcam access, but which can send an image in place of a real camera stream), or on a connected Android device.
  6. Connect to the room URL you are testing, and to see it work, connect again either in another simulator, on another device, or directly using a web browser. Careful of mic feedback! You might want to mute one or both sides' audio if they're near each other.

About

A 1 to 1 video chat app using the Daily Client SDK for Android

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages