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.
- 🎥 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
ViewModelandStateFlow. - 🧭 Lifecycle-aware UI updates using
collectAsStateWithLifecycle(). - 🧰 Clean separation of concerns for better scalability.
| 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 |
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()
}The app requires the following permissions:
CAMERARECORD_AUDIOINTERNETMODIFY_AUDIO_SETTINGS
These are automatically requested using rememberLauncherForActivityResult at runtime.
MainActivity
├── MainScreen
│ ├── PermissionWrapper
│ │ └── VideoScreen (after permissions granted)
│ └── Animated Image Split View
├── VideoViewModel (handles Daily.co call lifecycle)
└── Daily.co SDK (CallClient, VideoTrack)
VideoViewModelmanages:- Call join/leave
- Video track updates
- Call state transitions
- UI observes state changes through a single
StateFlow.
git clone https://github.com/<your-username>/TextApp.git
cd TextAppMake sure you have:
- Android Studio Giraffe or later
- Gradle 8+
- Android SDK 33+
In PermissionWrapper.kt:
val roomUrl = "https://assignment.daily.co/veAtJuIS1rCfy8yHDQbl"You can create your own room at https://dashboard.daily.co.
./gradlew assembleDebugor simply press
- When the app launches, it requests camera and audio permissions.
- Once granted, it initializes the Daily.co CallClient.
- Joins the given room URL using
viewModel.joinCall(url). - Displays the local/remote video track in a Composable using
AndroidView. - After 10 seconds, the UI animates into a split-screen view with a vertical divider.
| 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 |
This project is licensed under the MIT License.
You’re free to use, modify, and distribute it with attribution.