A comprehensive Android application demonstrating modern modularization patterns with MVI + Clean Architecture, featuring advanced media handling, Room database integration, and sophisticated permission management.
This project showcases a production-ready Android application built with modern development practices, featuring:
- Complete Modularization: Each feature is independently developed and testable
- Clean Architecture: Clear separation of concerns with Data, Domain, and Presentation layers
- MVI Pattern: Model-View-Intent architecture for predictable state management
- Advanced Media Handling: MediaStore integration with zoomable images and ExoPlayer videos
- Room Database: Local storage for favorites with proper data management
- Permission Management: Comprehensive permission handling for Android 6-16
- Modern UI: Material Design 3 with ViewBinding
- Type-Safe Navigation: Jetpack Navigation with compile-time safety
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Presentation Layer β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ ββββββββββββββ β
β β Images β β Videos β β Favourites β β Settings β β
β β Feature β β Feature β β Feature β β Feature β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ ββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Domain Layer β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ ββββββββββββββ β
β β Images β β Videos β β Favourites β β Settings β β
β β Domain β β Domain β β Domain β β Domain β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ ββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Data Layer β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ ββββββββββββββ β
β β Images β β Videos β β Favourites β β Settings β β
β β Data β β Data β β Data β β Data β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ ββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Core Modules β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ ββββββββββββββ β
β β Core β β Database β β MediaStore β β Navigation β β
β β (Common) β β (Room) β β (Media) β β (Abstract) β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ ββββββββββββββ β
β βββββββββββββββ β
β β Theme β β
β β (Styling) β β
β βββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
The application follows the Model-View-Intent (MVI) pattern for predictable state management:
- Intent: User actions and system events
- Model: Immutable state representing the UI
- View: Reactive UI that renders the current state
User Action β Intent β ViewModel β State β UI Update
ModularizationSample/
βββ :core/ # Common utilities and base classes
βββ :core:database/ # Room database setup and entities
βββ :core:mediastore/ # MediaStore API wrapper and permissions
βββ :core:navigation/ # Navigation abstraction and interfaces
βββ :core:theme/ # Theme and styling resources
β
βββ :data:images/ # Images data layer
βββ :domain:images/ # Images domain layer
βββ :feature:images/ # Images presentation layer
β
βββ :data:videos/ # Videos data layer
βββ :domain:videos/ # Videos domain layer
βββ :feature:videos/ # Videos presentation layer
β
βββ :data:favourites/ # Favourites data layer (Room)
βββ :domain:favourites/ # Favourites domain layer
βββ :feature:favourites/ # Favourites presentation layer
β
βββ :data:settings/ # Settings data layer
βββ :domain:settings/ # Settings domain layer
βββ :feature:settings/ # Settings presentation layer
β
βββ :data:language/ # Language data layer
βββ :domain:language/ # Language domain layer
βββ :feature:language/ # Language presentation layer
β
βββ :data:onboarding/ # Onboarding data layer
βββ :domain:onboarding/ # Onboarding domain layer
βββ :feature:onboarding/ # Onboarding presentation layer
β
βββ :feature:entrance/ # Entrance screen
βββ :feature:dashboard/ # Dashboard with 4 bottom navigation items
βββ :feature:media-detail/ # Media detail screen (Images/Videos)
β
βββ :app/ # Main app module
- Entrance Screen: App entry point with splash/loading
- Language Selection: Multi-language support with persistence
- Onboarding Flow: User onboarding experience
- Dashboard: Main screen with 4 bottom navigation tabs
- Media Gallery: Images and Videos from MediaStore
- Favourites: Local storage with Room database
- Settings: App configuration and preferences
-
Image Gallery:
- MediaStore integration
- Favourite toggle functionality
- Zoomable image viewer with PhotoView
- Memory-optimized loading
-
Video Gallery:
- MediaStore integration
- Favourite toggle functionality
- ExoPlayer with custom controls
- Advanced video playback features
-
Media Detail Screen:
- Zoomable image viewer for images
- ExoPlayer for video playback
- Favourite toggle
- Media information display
- Room Database: Local storage for favourites
- Toggle Functionality: Add/remove favourites from any media
- Favourites Screen: Dedicated screen showing all favourites
- Real-time Updates: Live updates across all screens
- Data Persistence: Favourites persist across app restarts
- Android 6-16 Support: Comprehensive permission handling
- Limited Access Warning: Android 14+ limited access detection
- Settings Navigation: Direct navigation to app settings
- Permission Banner: Visual feedback for permission status
- Graceful Degradation: App functionality with limited permissions
- Material Design 3: Modern design system
- ViewBinding: Type-safe view binding
- Type-Safe Navigation: Compile-time navigation safety
- Responsive Design: Adaptive layouts for different screen sizes
- Dark/Light Theme: Theme support
- Smooth Animations: Fluid user interactions
- MVI Pattern: Model-View-Intent architecture for predictable state management
- Clean Architecture: Separation of concerns
- Repository Pattern: Data abstraction layer
- Use Cases: Business logic encapsulation
- Kotlin: Modern programming language
- ViewBinding: Type-safe view binding
- Jetpack Navigation: Type-safe navigation
- Room Database: Local data persistence
- Koin: Dependency injection framework
- Coroutines & Flow: Asynchronous programming
- MediaStore API: System media access
- ExoPlayer: Advanced video playback
- PhotoView: Zoomable image viewer
- Glide: Image loading and caching
- Accompanist Permissions: Permission handling
- Security Best Practices: Secure data handling
- Memory Management: Optimized resource usage
- Minimum SDK: Android 6.0 (API 23)
- Target SDK: Android 16 (API 35)
- Compile SDK: Android 16 (API 35)
- Tested Devices: Various screen sizes and Android versions
- Android Studio Hedgehog or later
- JDK 17 or later
- Android SDK 35
- Kotlin 1.9.0 or later
- Gradle 8.0 or later
- Clone the repository
- Open in Android Studio
- Sync Gradle files
- Run the application
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
For support and questions, please open an issue in the repository.
Note: This project demonstrates advanced Android development practices and serves as a reference implementation for modularized applications with Clean Architecture and MVI pattern.