Skip to content

ayush2006-creator/DailyVedioApp

Repository files navigation

📱 TextApp – Real-time Video Calling with Daily.co and Jetpack Compose

TextApp is a modern Android application that enables real-time video calling using the Daily.co video API.
Built entirely with Jetpack Compose and Kotlin, it includes permission handling, animated UI transitions, and lifecycle-aware state management.


✨ Features

  • 🎥 Join Daily.co video calls using a simple room URL.
  • 🔐 Automatic permission handling for camera, audio, and internet.
  • 🪄 Smooth split-screen animation after 10 seconds.
  • 🧠 MVVM architecture with ViewModel and StateFlow.
  • 🧭 Lifecycle-aware UI updates using collectAsStateWithLifecycle().
  • 🧰 Clean separation of concerns for better scalability.

🧱 Tech Stack

Technology Purpose
Kotlin + Jetpack Compose UI and logic
Daily.co SDK (co.daily) Real-time video calling
Lifecycle ViewModel + StateFlow Reactive state management
Activity Result API Permission handling
AndroidView Interop Integrating Daily’s VideoView in Compose

📦 Dependencies

Add these to your app/build.gradle.kts:

dependencies {
    implementation("co.daily:client:0.8.0")
    implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.1")
    implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.1")
}

Make sure to also include:

repositories {
    google()
    mavenCentral()
}

🔐 Required Permissions

The app requires the following permissions:

  • CAMERA
  • RECORD_AUDIO
  • INTERNET
  • MODIFY_AUDIO_SETTINGS

These are automatically requested using rememberLauncherForActivityResult at runtime.


🧭 Architecture Overview

MainActivity
 ├── MainScreen
 │    ├── PermissionWrapper
 │    │     └── VideoScreen (after permissions granted)
 │    └── Animated Image Split View
 ├── VideoViewModel (handles Daily.co call lifecycle)
 └── Daily.co SDK (CallClient, VideoTrack)
  • VideoViewModel manages:
    • Call join/leave
    • Video track updates
    • Call state transitions
  • UI observes state changes through a single StateFlow.

🚀 Getting Started

1. Clone the repo

git clone https://github.com/<your-username>/TextApp.git
cd TextApp

2. Open in Android Studio

Make sure you have:

  • Android Studio Giraffe or later
  • Gradle 8+
  • Android SDK 33+

3. Set your Daily.co room URL

In PermissionWrapper.kt:

val roomUrl = "https://assignment.daily.co/veAtJuIS1rCfy8yHDQbl"

You can create your own room at https://dashboard.daily.co.

4. Build and run

./gradlew assembleDebug

or simply press ▶️ in Android Studio.


🧪 How It Works

  1. When the app launches, it requests camera and audio permissions.
  2. Once granted, it initializes the Daily.co CallClient.
  3. Joins the given room URL using viewModel.joinCall(url).
  4. Displays the local/remote video track in a Composable using AndroidView.
  5. After 10 seconds, the UI animates into a split-screen view with a vertical divider.

🧰 Key Files

File Description
MainActivity.kt Entry point, sets up MainScreen and ViewModel
MainScreen.kt Handles split-screen animation and PermissionWrapper
PermissionWrapper.kt Requests required permissions
VideoScreen.kt Displays the video call or status messages
VideoViewModel.kt Manages call state, tracks, and Daily.co client

📜 License

This project is licensed under the MIT License.
You’re free to use, modify, and distribute it with attribution.


🧠 References


🪄 Maintainer: Ayush Poddar

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages