Sappyn is an Android media playback application built with modern development practices. It provides a reliable interface for both live and on-demand media content, dynamically fetched from remote JSON repositories, utilizing the Jetpack Media3 library for advanced playback capabilities.
This project implements a scalable architecture and leverages official Android libraries to ensure performance and maintainability. The codebase is fully documented using KDoc standards to ensure long-term clarity and ease of maintenance.
- Architecture: MVVM (Model-View-ViewModel) following clean architecture principles.
- Media Handling: Jetpack Media3 (ExoPlayer) for media session management and background playback.
- Networking: Retrofit and OkHttp for REST API integration.
- Asynchronous Programming: Kotlin Coroutines and Flow for reactive data streams.
- Data Management: Repository pattern using Singletons for centralized access to local cache and remote metadata synchronization.
- Image Loading: Coil for high-performance, asynchronous artwork loading with automatic memory and disk caching.
- User Interface: Material Design 3 and View Binding for safe, adaptive layouts across various screen sizes and orientations.
- Testing: Unit tests powered by Robolectric and MockK to ensure business logic reliability.
- Error Monitoring: Firebase Crashlytics for real-time crash reporting and production stability analysis.
- Robust Media Service: Powered by Media3 to handle foreground playback, system media controls, and hardware button events.
- Smart Synchronization: Efficiently updates local media metadata using version tracking to minimize data usage, with full offline support for the cached catalog.
- State Persistence: Automatically preserves the last played media item and its playback position across application restarts.
- Proactive Health Monitoring: Periodically verifies data integrity and enforces mandatory update policies to ensure a secure and up-to-date user experience.
- Edge-to-Edge Experience: Immersive UI implementation utilizing the latest Android windowing APIs for a seamless, modern feel.
- Adaptive Layouts: Optimized UI for tablets, including dedicated landscape configurations.
- RTL Support: Full support for right-to-left languages, ensuring an optimized layout for global accessibility.
- Multi-window Support: Fully optimized for multitasking, split-screen, and various screen form factors, including foldables and tablets.
- Comprehensive Localization: Full support for English, Italian, Portuguese, and Spanish.
- Deep Link Integration: Supports custom URI schemes (
sappyn://) for external navigation and direct media playback.
The application synchronizes with a remote JSON catalog. To simplify the data mapping layer and ensure architectural consistency, the schema mirrors the Jetpack Media3 MediaItem structure.
A sample implementation of this contract is available in api-mock/app_info.json.
Key Mapping:
id&uri: Mapped directly tomediaIdandrequestMetadata.metadata: Populates theMediaMetadataclass (title, type, availability).extras: Custom bundle for application-specific fields (region,city,modulation).
To build the project locally, ensure you have the latest version of Android Studio installed.
git clone https://github.com/arnnalddo/Sappyn.gitThis project uses local.properties to manage API endpoints and sensitive configurations. To compile the app, create a local.properties file in the root directory (if it doesn't exist) and add the following properties:
# API Endpoints
DEBUG_MAIN_API_URI=https://your-api-url.com/config.json
DEBUG_MAIN_API_URI_ALT=https://fallback-url.com/config.json
DEBUG_PRIVACY_URI=https://your-app.com/privacy
# Optional Tuning
DEBUG_SYNC_EXPIRY=60000
DEBUG_HEALTH_CHECK=30000Additionally, to enable Firebase Crashlytics and Analytics tracking, you must provide your own google-services.json file and place it in the /app directory.
./gradlew testThe production version is available on the Google Play Store:
This project is licensed under the Apache License 2.0.
