KiduyuTV is a Kotlin Android application with dedicated experiences for Android TV, Fire TV, phones, and tablets. One shared codebase combines TMDB discovery, native direct streaming, WebView stream capture, IPTV, watch history, Firebase sync, Trakt, and D-pad-friendly navigation.
- Purpose-built TV and mobile interfaces from one application module.
- Movies and TV shows powered by TMDB metadata, search, collections, cast, recommendations, companies, and networks.
- Native Media3 direct-stream player with HLS, DASH, and progressive playback.
- Provider aggregation, automatic stream ranking, manual source switching, and per-stream headers and cookies.
- Optional Web Sniffer that captures playable media and subtitle requests from provider WebViews.
- Video, audio, embedded subtitle, sniffed subtitle, and SubDL subtitle selection.
- Local Room history plus Firebase synchronization and 15-second playback progress updates.
- IPTV playlists, XMLTV EPG, favorites, schedules, and dedicated Live TV playback.
- Trakt authentication, history, collection, watchlist, recommendations, and scrobbling.
- Firebase authentication, sync, notifications, remote configuration, and update delivery.
DirectStreamActivity is the preferred native playback path when Direct Stream is enabled in Settings. Movie and episode actions bypass provider-selection screens and request aggregate streams from:
kiduyuTv_providers/api/streams/{movie|series}/{tmdbId}
Series requests append season and episode; movie requests do not.
The player supports:
- HLS, DASH, and direct/progressive sources.
- Provider-specific request headers and cookies on manifests, segments, and byte-range requests.
- Automatic selection of the best stream up to 1080p.
- Manual 1440p and 2160p selection through the Streams dialog.
- A visible buffered range and time-based buffering tuned for high-bitrate media.
- Stream switching while retaining the current playback position.
- Video, audio, and subtitle track dialogs with active-track state.
- SubDL subtitle search by TMDB ID, download, and ExoPlayer loading.
- Sniffed WebVTT and SRT subtitle handoff.
- Fit, fill, zoom, fixed-width, and fixed-height resize modes.
- Play/pause, seek, volume, media-key input, and TV-focusable controls.
- Previous and next episode navigation.
- Backdrop/loading state while streams are fetched or playback buffers.
- Retry and exit behavior when fetching or playback fails.
Playback history is checked locally and in Firebase before media starts. The newest saved position is restored, progress is persisted every 15 seconds, and episode metadata is updated when the viewer moves between episodes.
Try Web Sniffer is enabled by default. When the normal WebView flow is used, WebViewStreamSniffer watches network requests for playable HLS, DASH, and direct media URLs. It collects the request headers, cookies, and detected SRT/VTT subtitles, then hands the result to DirectStreamActivity.
Obvious placeholder media such as demo-video.mp4 is ignored. If no usable media request is captured, the existing WebView playback flow remains available.
PlayerActivity remains the provider-page player when Direct Stream is disabled. It resolves Firebase-configurable provider templates, blocks common ads and popups, and provides TV cursor navigation where required.
- Trending, popular, top-rated, and now-playing catalogs.
- Movie and TV detail pages with trailers, cast, crew, genres, recommendations, seasons, and episodes.
- Collections, production companies, networks, and curated themed rows.
- Search across movies and television.
- Continue Watching and synchronized watch history.
- My List for movies, shows, companies, networks, and cast shortcuts.
The Live TV area provides:
- M3U playlist loading and streaming parsing.
- XMLTV program-guide data.
- Category browsing and channel search.
- Local and Firebase-synchronized favorite channels.
- Live TV, Schedule, and My Channels tabs.
- Dedicated IPTV and schedule players.
- Configurable scraper addresses for providers whose domains change.
For scraper maintenance and redirect strategies, see DYNAMIC_SCRAPER_ENDPOINT_GUIDE.md.
Trakt integration includes OAuth sign-in, profile details, history, collection, watchlist, recommendations, token refresh, synchronization helpers, and movie/episode scrobbling.
Compose UI (TV / Phone)
โ
โโโ ViewModels + StateFlow
โ โโโ TMDB / Trakt repositories
โ โโโ IPTV / schedule repositories
โ โโโ Firebase synchronization
โ
โโโ Room cache + watch history
โ
โโโ Playback
โโโ DirectStreamActivity
โ โโโ Provider stream API
โ โโโ Media3 PlayerEngine
โ โโโ Stream / track dialogs
โ โโโ SubDL subtitles
โโโ WebViewStreamSniffer
โโโ PlayerActivity
โโโ IptvPlayerActivity
โโโ SchedulePlayerActivity
The application follows an MVVM-style structure:
- Compose screens render immutable state and dispatch user actions.
- ViewModels expose asynchronous state through coroutines and
StateFlow. - Repositories coordinate remote services, caching, and domain logic.
- Room stores saved media, history, catalog caches, detail caches, and genres.
- SharedPreferences stores lightweight playback and application settings.
- Firebase synchronizes user data and remote provider configuration.
| Area | Technology |
|---|---|
| Language | Kotlin |
| UI | Jetpack Compose, Material 3, XML player layouts |
| Navigation | Navigation Compose |
| Playback | Media3 ExoPlayer 1.5.1, HLS, DASH |
| Networking | Retrofit 2.11.0, OkHttp 4.12.0, Volley |
| Async state | Coroutines, Flow, StateFlow |
| Local storage | Room 2.6.1, SharedPreferences |
| Images | Coil, Glide |
| Web content | Android WebView, AndroidX WebKit, Jsoup |
| Cloud | Firebase Auth, Analytics, Realtime Database, Firestore, Messaging |
| Integrations | TMDB, Trakt, SubDL |
| Advertising | StartApp, AdMob, Wortise, Unity, UMP |
| Android | minSdk 24, targetSdk 35, compileSdk 35, Java 17 |
app/src/main/
โโโ java/com/kiduyuk/klausk/kiduyutv/
โ โโโ activity/ # Main and splash activities
โ โโโ application/ # Application initialization
โ โโโ data/
โ โ โโโ api/ # TMDB and remote APIs
โ โ โโโ local/ # Room database and DAOs
โ โ โโโ repository/ # Domain repositories
โ โ โโโ sync/ # Firebase and Trakt sync
โ โโโ ui/
โ โ โโโ navigation/ # TV and phone graphs
โ โ โโโ player/
โ โ โ โโโ directstream/ # Native player, APIs, dialogs, models
โ โ โ โโโ webviewsniffer/ # WebView media capture
โ โ โ โโโ webview/ # Provider WebView player
โ โ โโโ screens/ # TV and mobile Compose screens
โ โ โโโ theme/
โ โโโ network/
โ โโโ util/
โ โโโ viewmodel/
โโโ res/ # Layouts, drawables, strings, themes
โโโ assets/ # WebView filtering rules
The formfactor flavor dimension produces two applications:
| Flavor | Application ID | Experience |
|---|---|---|
phone |
com.kiduyuk.klausk.kiduyutv.phone |
Touch-first phone and tablet navigation |
tv |
com.kiduyuk.klausk.kiduyutv.tv |
D-pad-first Android TV and Fire TV navigation |
Common build values:
versionName 1.1.71
versionCode 4
minSdk 24
targetSdk 35
compileSdk 35
./gradlew assemblePhoneDebug
./gradlew assembleTvDebugGenerated debug APKs are written under:
app/build/outputs/apk/phone/debug/
app/build/outputs/apk/tv/debug/
Release variants are available as assemblePhoneRelease and assembleTvRelease. Production builds require the project's signing configuration.
Before building, configure the services used by your selected features:
| Service | Location |
|---|---|
| Firebase | app/google-services.json and Firebase console configuration |
| TMDB | data/api/ApiClient.kt / the project's secure build configuration |
| Trakt | Trakt client configuration used by TraktAuthManager |
| SubDL | Secure API-key configuration consumed by SubdlSubtitleClient |
| Stream providers | Firebase app_config/stream_providers_Configuration |
| Ads | Manifest placeholders and app/build.gradle |
Do not commit production API keys, signing keys, service-account credentials, or private configuration exports.
- Network monitoring reports connectivity, metered state, VPN, proxy, and DNS conditions.
- WebView filtering uses bundled EasyList, EasyPrivacy, and custom rules.
- Stream failures stay within native playback with retry/exit controls instead of silently changing playback modes.
- Release builds enable code shrinking and resource shrinking.
- Users control Direct Stream, Web Sniffer, synchronization, Trakt, and advertising-related settings.
Copyright ยฉ 2026 KiduyuTv. All rights reserved.
This repository and its documentation are proprietary. No permission is granted to use, copy, modify, publish, distribute, sublicense, lease, or sell the software without prior written authorization from the copyright holder. See LICENSE for the complete terms.















