How lizongying/my-tv works
MyTV is an Android TV live-channel player. The main workflow is remote-control selection in the channel browser, followed by request orchestration to obtain playback information and URLs, then playback and display of channel data. The app also retrieves EPG data through several provider-specific protocols and includes a user-triggered release-update flow. The excerpts show UI dispatch, model behavior, selected service contracts, and update handling; many API calls and player internals are unsampled, so those connections are left unverified.
Main entry points: Request.kt Request orchestration · MainFragment.kt Channel browser · TVViewModel.kt Channel state · UpdateManager.kt Update manager
Components 20
TV interface
- App activity
app/src/main/java/com/lizongying/mytv/MainActivity.kt - Channel browser
app/src/main/java/com/lizongying/mytv/MainFragment.kt - Settings
app/src/main/java/com/lizongying/mytv/SettingFragment.kt - Channel catalog
app/src/main/java/com/lizongying/mytv/TVList.kt
Channel playback
- Channel state
app/src/main/java/com/lizongying/mytv/models/TVViewModel.kt - Request orchestration
app/src/main/java/com/lizongying/mytv/Request.kt - Video player
app/src/main/java/com/lizongying/mytv/PlayerFragment.kt - Program guide
app/src/main/java/com/lizongying/mytv/models/EPG.kt
Provider services
- API client
app/src/main/java/com/lizongying/mytv/api/ApiClient.kt - Yangshipin API
app/src/main/java/com/lizongying/mytv/api/YSP.kt - Live API
app/src/main/java/com/lizongying/mytv/api/YSPApiService.kt - Proto EPG API
app/src/main/java/com/lizongying/mytv/api/YSPProtoService.kt - JCE EPG API
app/src/main/java/com/lizongying/mytv/api/YSPJceService.kt - F-provider API
app/src/main/java/com/lizongying/mytv/api/FAuthService.kt - Playback reporting
app/src/main/java/com/lizongying/mytv/api/YSPBtraceService.kt
Release updates
- Update manager
app/src/main/java/com/lizongying/mytv/UpdateManager.kt - Release service
app/src/main/java/com/lizongying/mytv/api/ReleaseService.kt - Android downloader
Other components
- TV viewer
- Provider servers
Connections 24
- TV viewer → App activity: operates
app/src/main/java/com/lizongying/mytv/MainActivity.kt - App activity → Channel browser: hosts
app/src/main/java/com/lizongying/mytv/MainActivity.kt - Channel browser → Request orchestration: fetches data
app/src/main/java/com/lizongying/mytv/MainFragment.kt - Channel browser → Channel state: updates selection
app/src/main/java/com/lizongying/mytv/MainFragment.kt - Channel browser → Channel catalog: builds rows
app/src/main/java/com/lizongying/mytv/MainFragment.kt - Request orchestration → Channel state: updates URLs and guide
app/src/main/java/com/lizongying/mytv/Request.kt - Channel state → Video player: supplies playback state
app/src/main/java/com/lizongying/mytv/PlayerFragment.kt - Channel state → Program guide: maps guide entries
app/src/main/java/com/lizongying/mytv/models/TVViewModel.kt - Request orchestration → API client: uses client
app/src/main/java/com/lizongying/mytv/Request.kt - Request orchestration → Yangshipin API: coordinates provider requests
app/src/main/java/com/lizongying/mytv/Request.kt - Yangshipin API → Live API: configures
- Request orchestration → Proto EPG API: requests guide
app/src/main/java/com/lizongying/mytv/Request.kt - Request orchestration → JCE EPG API: requests guide
app/src/main/java/com/lizongying/mytv/Request.kt - Request orchestration → F-provider API: requests auth and guide
app/src/main/java/com/lizongying/mytv/Request.kt - Request orchestration → Playback reporting: sends reports
app/src/main/java/com/lizongying/mytv/Request.kt - Live API → Provider servers: calls
- Proto EPG API → Provider servers: calls
- JCE EPG API → Provider servers: calls
- F-provider API → Provider servers: calls
- Playback reporting → Provider servers: reports to
- Settings → Update manager: initiates update
app/src/main/java/com/lizongying/mytv/SettingFragment.kt - Update manager → Release service: checks release
- Update manager → Android downloader: queues APK
app/src/main/java/com/lizongying/mytv/UpdateManager.kt - Release service → Provider servers: checks release