How yangdiansheng/ymusic works
Project type and purpose
• This is a multi-module Android client application called “YMusic.”
• It exposes a music streaming UI (Activities, Fragments) that interacts with audio playback, network requests, image loading, sharing, update checks, QR scanning, etc.
• The root project uses Gradle and is composed of one “app” module plus nine feature/support libraries (lib_audio, lib_network, lib_common_ui, lib_imageloader, lib_video, lib_webview, lib_share, lib_update, lib_pullalive, lib_qrcode).
File structure
• Top-level modules:
• app/ – the main Android application (UI layer, business-logic glue, RequestCenter, mock API)
• lib_* – independent Android libraries each providing a single concern:
– lib_network: HTTP client, request/response handlers
– lib_audio: background music service, playback controls
– lib_common_ui: shared UI components (base activities, custom views)
– lib_imageloader: image loading/ caching manager
– lib_video: video playback helpers
– lib_webview: embedded WebView utilities
– lib_share: social/share integration
– lib_update: app update checker/downloader
– lib_pullalive: keep-alive/background tasks
– lib_qrcode: QR code scanning utilities
• app/src/main/java/com/yangdiansheng/music:
• api/MockData and RequestCenter: data access entry point
• view/: Activities and Fragments for home, login, discovery, friend, mine
• MApplication: global application subclass
• BaseModel: shared data model base class
• Gradle config files (build.gradle, settings.gradle) wire dependencies between modules.