This document provides a comprehensive overview of the Live TV Android application project structure, implementation details, and build requirements.
A fully implemented Android Live TV streaming application with:
- ✅ Complete source code (Kotlin + Jetpack Compose)
- ✅ ExoPlayer (Media3) integration for HLS/M3U8 streaming
- ✅ Network security configuration for local HTTP server
- ✅ Build configuration (Gradle)
- ✅ Signing configuration with keystore
- ✅ GitHub Actions workflow for CI/CD
- ✅ Comprehensive documentation
-
✅
MainActivity.kt- Main activity with Jetpack Compose UI- Video player component (16:9 aspect ratio)
- Category tabs (All, Bangla, English, Hindi, Islamic, Kids, Sports)
- Channel grid (3 columns)
- Top bar with logo and active users
- ExoPlayer integration with lifecycle management
-
✅
Channel.kt- Data model- Channel data class with id, name, category, imageUrl
- Category enum with display names
-
✅
ChannelParser.kt- HTML parsing utility- HTML parser using Jsoup
- Sample channel data for demo
- Support for parsing HTML channel lists
✅ AndroidManifest.xml - App manifest with permissions
✅ build.gradle (root) - Root build configuration
✅ build.gradle (app) - App build configuration with dependencies
✅ settings.gradle - Gradle settings
✅ gradle.properties - Gradle properties
✅ proguard-rules.pro - ProGuard rules
✅ network_security_config.xml - Network security for HTTP
✅ strings.xml - App strings and labels
✅ colors.xml - Color definitions
✅ themes.xml - App theme
✅ Launcher icons - All density sizes (mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi)
- Regular and round variants
- Adaptive icons (API 26+)
✅ gradlew - Gradle wrapper script (Unix/Linux/Mac)
✅ gradlew.bat - Gradle wrapper script (Windows)
✅ gradle-wrapper.jar - Gradle wrapper executable
✅ gradle-wrapper.properties - Wrapper configuration
✅ build-apk.sh - Automated build script
✅ .github/workflows/android-build.yml - GitHub Actions workflow
- Automatically builds debug and release APKs
- Uploads artifacts
- Creates releases on tag push
✅ README.md - Main project documentation
✅ BUILD_INSTRUCTIONS.md - Detailed build instructions
✅ PROJECT_OVERVIEW.md - This file
✅ .gitignore - Git ignore rules for Android
Server Details:
- Base URL:
http://10.200.13.14/ - Stream endpoint:
player.php?stream={ID} - Image path:
assets/images/{CHANNEL_NAME}.png
Network Security:
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">10.200.13.14</domain>
</domain-config>All required dependencies are configured in app/build.gradle:
Core:
- androidx.core:core-ktx:1.9.0
- androidx.lifecycle:lifecycle-runtime-ktx:2.5.1
- androidx.activity:activity-compose:1.6.1
Jetpack Compose:
- androidx.compose:compose-bom:2023.01.00
- androidx.compose.ui:ui
- androidx.compose.material3:material3
- androidx.compose.material:material-icons-extended
ExoPlayer (Media3):
- androidx.media3:media3-exoplayer:1.0.2
- androidx.media3:media3-exoplayer-hls:1.0.2
- androidx.media3:media3-ui:1.0.2
Utilities:
- io.coil-kt:coil-compose:2.2.2 (Image loading)
- org.jsoup:jsoup:1.15.4 (HTML parsing)
- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4
Keystore: app/keystore.jks (included for development)
- Store Password: livetv123
- Key Alias: livetv
- Key Password: livetv123
./build-apk.shThis script will:
- Clean previous builds
- Build debug APK
- Build release APK
- Display APK locations and sizes
Debug APK:
./gradlew assembleDebugOutput: app/build/outputs/apk/debug/app-debug.apk
Release APK:
./gradlew assembleReleaseOutput: app/build/outputs/apk/release/app-release.apk
Push to repository or create a tag:
git push origin mainThe GitHub Actions workflow will automatically:
- Build both debug and release APKs
- Upload as artifacts
- Create a release (if tagged)
After successful build:
app/build/outputs/apk/
├── debug/
│ └── app-debug.apk (Development build)
└── release/
└── app-release.apk (Production build, signed)
# Install debug APK
adb install app/build/outputs/apk/debug/app-debug.apk
# Install release APK
adb install app/build/outputs/apk/release/app-release.apk- Open the project in Android Studio
- Connect device or start emulator
- Click "Run" (Shift+F10)
- ✅ ExoPlayer integration with Media3
- ✅ HLS/M3U8 support
- ✅ 16:9 aspect ratio
- ✅ Player controls (play, pause, seek)
- ✅ Auto-play on channel selection
- ✅ Channel name overlay
- ✅ Top bar with logo and active users count
- ✅ Category tabs (All, Bangla, English, Hindi, Islamic, Kids, Sports)
- ✅ Channel grid (3 columns, responsive)
- ✅ Channel thumbnails with fallback text
- ✅ Material 3 design
- ✅ Smooth animations and transitions
- ✅ Channel data model
- ✅ HTML parser for channel lists
- ✅ Sample data included
- ✅ Category filtering
- ✅ Image loading with Coil
- ✅ HTTP cleartext traffic configured
- ✅ Local server support (10.200.13.14)
- ✅ Internet permission
- ✅ Network state permission
Edit ChannelParser.kt:
private const val BASE_URL = "http://YOUR_IP/"Edit ChannelParser.kt:
fun getSampleChannels(): List<Channel> {
return listOf(
Channel("1", "Channel Name", "Category", "${BASE_URL}image.png"),
// Add more...
)
}Edit MainActivity.kt:
colorScheme = lightColorScheme(
primary = Color(0xFFYOURCOLOR),
// ...
)Use the built-in parser:
val html = loadHtmlFromServer()
val channels = ChannelParser.parseChannels(html)To successfully build this project, you need:
- JDK 8 or higher installed and configured
- Android SDK with API level 33 or higher
- Internet connection to download Gradle dependencies (first build only)
- Gradle 8.0+ (included via wrapper)
The first build will download all dependencies from:
- Google Maven repository
- Maven Central
- Gradle Plugin Portal
Estimated download size: ~500MB (one-time)
The project requires internet access on first build to download:
- Gradle distribution
- Android Gradle Plugin
- AndroidX libraries
- ExoPlayer/Media3
- Compose libraries
- Other dependencies
After first successful build, Gradle cache allows offline builds.
The application expects:
- HTTP server at 10.200.13.14
- Endpoint:
player.php?stream={ID}returning HLS stream - Images at:
assets/images/{CHANNEL_NAME}.png
- Network security config allows HTTP to 10.200.13.14 only
- Included keystore is for development only
- For production, use proper signing and remove HTTP allowance
Language: Kotlin
UI Framework: Jetpack Compose
Build System: Gradle
Min SDK: 24 (Android 7.0)
Target SDK: 33 (Android 13)
Source Files: 3 Kotlin files
Resources: 4 XML configs + icons
Dependencies: ~15 libraries
Lines of Code: ~800 (excluding comments)
Before building, verify:
- JDK installed and JAVA_HOME set
- Android SDK installed
- Internet connection available
- gradlew has execute permissions (
chmod +x gradlew) - All files present in project directory
- No modifications needed for initial build
A successful build will:
- ✅ Download all dependencies
- ✅ Compile Kotlin code successfully
- ✅ Process resources without errors
- ✅ Generate debug APK (~15-20 MB)
- ✅ Generate signed release APK (~15-20 MB)
- ✅ Place APKs in
app/build/outputs/apk/
For build issues:
- Check
BUILD_INSTRUCTIONS.mdtroubleshooting section - Verify all requirements are met
- Check Gradle error messages for specific issues
- Ensure internet connectivity for first build
Once built:
- Install APK on device:
adb install app/build/outputs/apk/debug/app-debug.apk - Grant necessary permissions (Internet)
- Ensure server at 10.200.13.14 is accessible
- Launch app and select a channel
- Enjoy live TV streaming!
Project Status: ✅ READY FOR BUILD
All code, configuration, and documentation is complete. The project is ready to build APKs once dependencies are downloaded.