Asgard is a native Android app for downloading YouTube videos and audio directly to your device — no server, no API key, no ads. It uses NewPipeExtractor to resolve stream URLs and Android's own DownloadManager to handle the actual transfer, wrapped in a small system-themed Jetpack Compose UI.
"can be coupled with YGGDRASIL music player"
- Paste a link or share into the app — Asgard registers as a share target, so you can hit "Share" on a YouTube video/playlist from the YouTube app or a browser and send it straight to Asgard.
- MP4 or MP3 — download the best available video stream, or extract just the audio, select format and resolution or choose defaults.
- Playlist support — pasting a playlist URL expands it into individual queued downloads, saved into a subfolder named after the playlist.
- Download queue — add several links in a row, or one multiline; they're processed sequentially with live progress and status per item.
- Custom download folder — pick any folder on-device (via the Storage Access Framework) instead of the default
Downloadsfolder. - Foreground service + notification — downloads keep running and are visible in the notification shade while active.
- Wi-Fi only download — enable wifi only download to not eat through your whole data.
Asgard doesn't talk to any Asgard-owned backend — everything happens on-device:
NewPipeExtractorparses the YouTube URL/playlist and resolves available audio/video streams, using a customDownloader(AsgardApp.kt) backed by OkHttp to make the actual HTTP calls.DownloaderViewModelowns the in-memory download queue, picks the best stream (highest bitrate for MP3, highest resolution muxed stream for MP4), and hands the resulting direct URL to Android'sDownloadManager.DownloadServiceis a foregroundServicethat observes the queue and keeps a persistent notification alive while at least one item is downloading/extracting/moving, so the OS doesn't kill the app mid-download.- If a custom download folder is set, the finished file is copied there via
DocumentFile/SAF and the original copy in the publicDownloadsfolder is deleted.
| Layer | Choice |
|---|---|
| Language | Kotlin |
| UI | Jetpack Compose + Material 3 |
| Extraction | NewPipeExtractor v0.26.3 |
| Networking | OkHttp |
| Downloads | Android DownloadManager + Storage Access Framework |
| Min SDK / Target SDK | 33 / 36 |
app/src/main/java/com/example/asgard/
├── AsgardApp.kt # Application class — initializes NewPipe with an OkHttp-backed Downloader
├── MainActivity.kt # Compose UI: downloader screen, settings screen, queue list
├── DownloaderViewModel.kt # Queue state, extraction, DownloadManager orchestration
├── DownloadService.kt # Foreground service + notification while downloads are active
└── ui/theme/ # Compose color scheme, typography, theming
git clone <repo-url>
cd Asgard
./gradlew assembleDebug # debug APK
./gradlew assembleRelease # release APK -> Asgard_Android13.apkRequires Android Studio (or the Gradle/JDK toolchain it bundles) with SDK 36 installed.
| Permission | Why |
|---|---|
INTERNET / ACCESS_NETWORK_STATE |
fetch video info & stream data |
FOREGROUND_SERVICE / FOREGROUND_SERVICE_DATA_SYNC |
keep downloads running with a visible notification |
POST_NOTIFICATIONS |
show download progress notification (Android 13+) |
Asgard is a general-purpose downloading tool built on an open-source extraction library. Downloading copyrighted content without permission may violate YouTube's Terms of Service and/or local law. You're responsible for how you use this app.
