Skip to content

Latest commit

 

History

History
129 lines (94 loc) · 5.22 KB

README.md

File metadata and controls

129 lines (94 loc) · 5.22 KB

Procode Offline Audiobook Player

App screenshot

📖 Overview

Procode Offline Audiobook Player is a premium‑styled, offline‑first Flutter application that lets users browse, organize, and listen to their local audiobooks without any internet connection. The UI follows a Sonic Noir aesthetic with dark‑mode support, glass‑morphism containers, smooth micro‑animations, and a cinematic feel.

The application is built with:

  • Flutter 3.22 (stable)
  • Riverpod 2.6 for state‑management
  • Just Audio + AudioService 0.18.18 for robust background playback and lock‑screen notifications
  • Hive for fast, offline‑first local storage

✨ Key Features

  • Local‑only library – Scan device storage for audiobooks and display cover art.
  • Background playback – Audio continues when the app is closed or the device is locked.
  • Lock‑screen & notification controls – Play, pause, skip, rewind, fast‑forward directly from the lock screen.
  • Dynamic theming – Dark Mode and Pure OLED Black themes react instantly across the UI.
  • Custom storage display – Shows accurate total/used storage (e.g., 128 GB total, 118.4 GB used).
  • Premium UI – Glass containers, animated gradients, custom Google Font Inter.
  • Cross‑platform – Works on Android (API 21+) and iOS (tested on iOS 17).

🛠️ Installation & Development

Prerequisites

Clone the repository

git clone https://github.com/Kishore-Procode/Procode_AudioBookReader.git
cd Procode_AudioBookReader

Install dependencies

flutter pub get

Run on a device

flutter run

Build a debug APK (Android)

flutter build apk --debug

Note: The project uses the androidStopForegroundOnPause: false flag together with androidNotificationOngoing: true – the flag has been removed to avoid a constant‑evaluation error in AudioServiceConfig.


📱 Permissions

Platform Permission Reason
Android READ_MEDIA_AUDIO / READ_MEDIA_IMAGES (API 33+) Access local audio files and cover images.
Android POST_NOTIFICATIONS Show playback controls on the lock screen.
iOS NSAppleMusicUsageDescription Access local audio files.
iOS NSPhotoLibraryAddUsageDescription (if users pick custom covers)

The app requests these at runtime via permission_handler.


🐞 Resolved Bugs & Improvements

Issue Fix Summary
Storage Display Bug Updated SettingsScreen to use actual device storage (StorageInfo.getTotalSpace) and corrected the displayed total to 128 GB with the correct used amount.
Theme Reactivity Refactored AppTheme and SettingsProvider to broadcast changes via Riverpod, making Dark Mode and Pure OLED Black update instantly across all widgets.
Persistent UI Overlay Removed stray Positioned overlay from ActiveAudioOutput and AboutSanctuary sections.
Lock‑screen Notification Controls Added custom MediaControl overrides (skipToPrevious, skipToNext, rewind, fastForward) in AudioHandler; created required vector drawable assets; fixed androidNotificationOngoing conflict.
Cover‑art loading Store cover URLs as file:// URIs, request storage permission, and added a safe fallback placeholder in AudiobookCard.
Build warnings Adjusted Gradle/Kotlin settings; added .gitignore for generated files.

📂 Project Structure (high‑level)

lib/
 ├─ core/                 # Constants, theme, utils
 ├─ database/             # Hive adapters & box management
 ├─ features/             # UI feature modules (home, library, settings, …)
 │   ├─ library/          # Library screen & provider
 │   ├─ player/           # Full‑screen player UI
 │   └─ settings/         # Settings UI and provider
 ├─ navigation/           # GoRouter configuration
 ├─ services/             # AudioHandler & StorageScanner
 └─ main.dart             # App entry point

test/                     # Widget tests
android/                  # Native Android project
ios/                      # Native iOS project

🤝 Contributing

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature/my‑feature).
  3. Commit your changes with clear messages.
  4. Open a Pull Request targeting main.

Please follow the existing code style (use flutter format and run flutter analyze).


📄 License

This project is licensed under the MIT License – see the LICENSE file for details.


📞 Contact