close
Skip to content

Repository files navigation

TubeFetch

Kotlin Android Jetpack Compose Dual Engine Android CI GitHub release License: MIT

TubeFetch is a modern, high-performance Android media downloader and extractor built with Kotlin, Jetpack Compose (Material 3), and Clean Architecture. It leverages a Zero-Failure Dual-Engine Architecture combining embedded yt-dlp / FFmpeg with a native OkHttp YouTube Innertube API fallback engine to provide fast, reliable offline video extraction (up to 4K) and audio transcoding directly on Android devices.


Features

  • Zero-Failure Dual-Engine Extraction: Combines on-device yt-dlp with a native OkHttp Innertube Web API fallback, ensuring reliable video info retrieval even when local sockets or SSL certificates face network restrictions.
  • Intelligent Quality Filtering: Automatically detects actual resolution formats for each video and presents only valid available stream options (4K, 1440p, 1080p, 720p, 480p, 360p), defaulting to Auto (Highest Available).
  • Dedicated Audio Extraction: Extract and convert video audio tracks directly into MP3, M4A, or WAV formats.
  • Material 3 Clean Aesthetics: Clean, professional UI/UX without intrusive decorations, unnecessary animations, or clunky layouts.
  • Smart Clipboard Detection: Automatically detects copied YouTube links and offers one-tap paste.
  • Reliable Background Downloads: Managed by Android WorkManager with ongoing notification progress, transfer speed (MB/s), and configurable Wi-Fi/Auto-Retry constraints.
  • Scoped MediaStore Storage: Saves all media directly into the public Download/TubeFetch folder on the device, automatically indexed by Android's media scanner and accessible by file managers and media players.
  • Comprehensive Settings Hub:
    • Appearance: System Default, Light, and Dark mode theming.
    • Preferences: DataStore-persisted default formats, quality resolutions (defaulting to Auto), and network constraints.
    • Storage & Diagnostics: Real-time disk storage analytics, 1-tap cache cleaner, and engine readiness checks.
    • About & Legal: In-app Educational Disclaimer and Open Source Licenses attributions.

Screenshots

Home (Video Preview) Downloads & Queue Settings & Theming Licenses & Legal
Home Screen Downloads Screen Settings Screen Licenses Dialog

Architecture & Tech Stack

TubeFetch follows the official Android architecture guidelines adhering to Clean Architecture and Unidirectional Data Flow (UDF):

app/src/main/java/dev/korryr/tubefetch/
├── domain/                    # Business logic & contracts (Framework-independent)
│   ├── model/                 # Domain entities (DownloadItem, VideoInfo, VideoQuality, etc.)
│   ├── repository/            # Repository interfaces (VideoRepository, SettingsRepository)
│   └── usecase/               # Use cases (AnalyzeVideoUseCase, DownloadVideoUseCase)
│
├── data/                      # Data sources & implementations
│   ├── local/                 # Room Database (Downloads & entities)
│   ├── settings/              # AndroidX DataStore Preferences implementation
│   ├── remote/extractor/      # Dual-Engine Extractor (CompositeVideoExtractorEngine, YtDlpExtractorEngine, InnertubeExtractorEngine)
│   └── repo/                  # Repository implementations (VideoRepositoryImpl)
│
├── ui/                        # Presentation layer (Jetpack Compose)
│   ├── features/
│   │   ├── home/              # URL input, video preview, format/quality sheets
│   │   ├── history/           # Downloads list, status cards, and filter chips
│   │   └── settings/          # Theming, preferences, storage tools, & disclaimer
│   ├── navigation/            # Compose Navigation
│   └── theme/                 # Material 3 Color schemes & Typography
│
├── worker/                    # AndroidX WorkManager background download workers
└── di/                        # Hilt (Dagger) dependency injection modules

Core Libraries & Tools

  • UI: Jetpack Compose & Material 3
  • Dependency Injection: Hilt
  • Asynchronous Processing: Kotlin Coroutines & Flow
  • Extraction Engines: YtDlpExtractorEngine (yt-dlp + FFmpegKit) + InnertubeExtractorEngine (OkHttp native API)
  • Local Storage: Room Database & DataStore Preferences
  • Background Tasks: AndroidX WorkManager
  • Image Loading: Coil
  • Logging: Timber

Code Quality & Testing

TubeFetch enforces strict code quality and unit test coverage across all layers:

  • Unit Testing: 5 comprehensive unit test suites (HomeViewModelTest, SettingsViewModelTest, DownloadsViewModelTest, AnalyzeVideoUseCaseTest, DownloadMapperTest).
  • Code Quality Pipeline: Enforces ktlint formatting, Detekt static analysis, and Android Lint via a single command:
    ./gradlew qualityCheck

Installation & Release Builds

Download from GitHub Releases

  1. Download the latest version from GitHub Releases:
    • TubeFetch-v2.0.0-arm64-v8a.apk (~55 MB — recommended for modern phones)
    • TubeFetch-v2.0.0-universal.apk (~190 MB — all-in-one package for any device)
  2. Open the downloaded file to install.
  3. If Android prompts:
    • Allow "Install unknown apps" for your browser or file manager.
    • If Google Play Protect displays "Unrecognized app" or "Blocked by Play Protect", tap More details -> Install anyway.

Getting Started

Prerequisites

  • Android Studio: Ladybug / Meerkat (or newer)
  • JDK: Version 17 or 21
  • Android SDK: Min SDK 26 (Android 8.0), Target SDK 35 (Android 15)

Build & Run

  1. Clone the repository:
    git clone https://github.com/korryrdev/tubeFetch-Kotlin.git
    cd tubeFetch-Kotlin
  2. Open the project in Android Studio.
  3. Run the automated quality check and unit tests:
    ./gradlew qualityCheck
    ./gradlew testDebugUnitTest
  4. Build the debug APK via Gradle:
    ./gradlew assembleDebug

Educational Notice & Legal Disclaimer

IMPORTANT: TubeFetch is developed strictly for educational, personal research, and software architecture demonstration purposes.

  • This software does not host, distribute, or stream any copyrighted media.
  • Users are solely responsible for ensuring that their downloads comply with applicable copyright laws, platform terms of service, and fair-use guidelines (such as personal backup, Creative Commons, and public domain media).
  • The developers assume no liability for any misuse of this application.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Developed by korryrdev.

About

TubeFetch Kotlin – Modern Android YouTube video & audio downloader built with Clean Architecture, MVVM, Jetpack Compose, Hilt, Room, WorkManager and Retrofit

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages