- Overview
- Features
- Architecture
- Data Flow
- Tech Stack
- Project Structure
- Prerequisites
- Quick Start
- Configuration
- Building the Project
- Testing
- Contributing
- Troubleshooting
- License
- Contact & Support
- Acknowledgments
Readify is a modern Android application designed to provide users with a seamless digital reading experience. Built with Java and powered by Firebase, Readify offers a comprehensive platform for managing, reading, and discovering PDF books. Whether you're a student, professional, or book enthusiast, Readify transforms your Android device into a portable library.
- PDF Reading - Advanced PDF viewer with smooth rendering
- User Authentication - Secure login and registration system
- Personal Library - Organize and manage your book collection
- Favorites - Quick access to your favorite books
- Book Store - Discover and download new books
- Categories - Organize books by custom categories
- Modern UI - Clean, intuitive Material Design interface
- Cloud Sync - Firebase-backed data synchronization
- User Registration - Create new accounts with email validation
- Secure Login - Firebase Authentication integration
- Password Recovery - Reset forgotten passwords via email
- Profile Management - Edit and update user information
- Session Management - Persistent login with secure token handling
- PDF Viewer - High-performance PDF rendering using Barteksc PDF Viewer
- Smooth Navigation - Page scrolling and zooming capabilities
- Reading Progress - Bookmark and resume functionality
- Full-Screen Mode - Distraction-free reading experience
- Personal Library - View and manage your book collection
- Category Organization - Create and manage custom categories
- Add Books - Upload PDF files to your library
- Featured Books - Showcase recommended or popular books
- Search Functionality - Quick search through your collection
- Favorite Books - Mark books as favorites for quick access
- Collections - Organize books into custom collections
- Quick Access - Dedicated favorites section
- Book Store - Browse available books
- Book Details - View comprehensive book information
- Download Books - Save books to your library
- Category Browsing - Filter books by categories
- Material Design - Modern, consistent UI/UX
- Dark Mode Support - Eye-friendly reading in low light
- Responsive Layouts - Optimized for different screen sizes
- Smooth Animations - Polished transitions and effects
- Custom Fonts - Enhanced typography with Adlam Display & Alexandria
Readify follows a layered architecture pattern with clear separation of concerns:
┌─────────────────────────────────────────┐
│ Presentation Layer │
│ (Activities, Adapters, UI Components) │
└──────────────┬──────────────────────────┘
│
┌──────────────▼──────────────────────────┐
│ Business Logic Layer │
│ (Managers, Filters, Helper Classes) │
└──────────────┬──────────────────────────┘
│
┌──────────────▼──────────────────────────┐
│ Data Layer │
│ (Models, API Services, Firebase SDK) │
└──────────────┬──────────────────────────┘
│
┌──────────────▼──────────────────────────┐
│ Backend Services │
│ (Firebase Auth, Database, Storage) │
└─────────────────────────────────────────┘
-
Activities: Handle user interactions and lifecycle management
MainActivity- Entry point and splash screenLogin/SignUp- Authentication flowsDashboard/HomeActivity- Main navigation hubLibraryActivity- Personal library managementPDFViewerActivity- PDF reading interfaceProfileActivity- User profile management
-
Adapters: Manage RecyclerView data binding
AdapterCategory- Category list displayStoreAdapter- Book store grid/listLibraryAdapter- Library book displayFeaturedBookAdapter- Featured books carousel
FavoriteManager- Manages favorite books stateFilterCategory- Category filtering logicHelperClass- Utility functions and helpers
-
Models:
BookModel- Book data structureModelCategory- Category data structureBookResponse- API response wrapper
-
API Services:
BookApi- Retrofit interface for book APIs
- Firebase Authentication - User management
- Firebase Realtime Database - Data storage
- Firebase Storage - PDF file storage
- ViewBinding - Type-safe view references
- Adapter Pattern - RecyclerView implementations
- Observer Pattern - Firebase realtime listeners
- Singleton Pattern - FavoriteManager, HelperClass
- MVC Pattern - Activity-based structure
User Input → Login Activity → Firebase Auth
↓
Validate Credentials
↓
Success → Dashboard Activity
↓
Failure → Error Message
Library/Store → Book Selection → BookReaderActivity
↓
Load PDF URL
↓
PDFViewerActivity
↓
Render PDF using PDFView
↓
Track Reading Progress
Local Action → Firebase Realtime Database
↓
Cloud Update
↓
Realtime Listener
↓
UI Update
| Technology | Version | Purpose |
|---|---|---|
| Java | 11 | Primary programming language |
| Android SDK | API 24-34 | Android development framework |
| Gradle | 8.7.2 | Build automation |
- AndroidX Libraries
- AppCompat
1.7.0 - ConstraintLayout
2.2.0 - RecyclerView
1.3.2 - Material Components
1.12.0 - Lifecycle Components
2.8.7
- AppCompat
- Firebase
- Firebase Authentication
23.1.0- User authentication - Firebase Realtime Database
21.0.0- Data storage - Firebase Storage
21.0.1- File storage - Google Services
4.4.2
- Firebase Authentication
- Retrofit
2.9.0- REST API client - Gson Converter
2.9.0- JSON serialization - OkHttp Logging
4.9.3- Network debugging
- Barteksc Android PDF Viewer
2.8.2- PDF display library
- View Binding - Type-safe view access
- ProGuard - Code obfuscation and optimization
- JUnit
4.13.2- Unit testing - Espresso
3.6.1- UI testing - AndroidX Test
1.2.1- Testing framework
Readify-Android-App/
├── app/
│ ├── src/
│ │ ├── main/
│ │ │ ├── java/com/example/readify/
│ │ │ │ ├── Activities/
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ ├── Dashboard.java
│ │ │ │ │ ├── HomeActivity.java
│ │ │ │ │ ├── Login.java
│ │ │ │ │ ├── SignUp.java
│ │ │ │ │ ├── ForgetPassword.java
│ │ │ │ │ ├── ProfileActivity.java
│ │ │ │ │ ├── EditProfile.java
│ │ │ │ │ ├── LibraryActivity.java
│ │ │ │ │ ├── CategoryDashboardActivity.java
│ │ │ │ │ ├── CatagoryAddActivity.java
│ │ │ │ │ ├── PdfAddActivity.java
│ │ │ │ │ ├── PDFViewerActivity.java
│ │ │ │ │ ├── BookReaderActivity.java
│ │ │ │ │ ├── FavouriteActivity.java
│ │ │ │ │ ├── FeatureBookActivity.java
│ │ │ │ │ ├── StoreActivity.java
│ │ │ │ │ └── TermCondition.java
│ │ │ │ ├── Adapters/
│ │ │ │ │ ├── AdapterCategory.java
│ │ │ │ │ ├── LibraryAdapter.java
│ │ │ │ │ ├── StoreAdapter.java
│ │ │ │ │ └── FeaturedBookAdapter.java
│ │ │ │ ├── Models/
│ │ │ │ │ ├── BookModel.java
│ │ │ │ │ ├── ModelCategory.java
│ │ │ │ │ └── BookResponse.java
│ │ │ │ ├── API/
│ │ │ │ │ └── BookApi.java
│ │ │ │ ├── Managers/
│ │ │ │ │ └── FavoriteManager.java
│ │ │ │ ├── Utils/
│ │ │ │ │ ├── HelperClass.java
│ │ │ │ │ ├── FilterCategory.java
│ │ │ │ │ └── DimActivity.java
│ │ │ ├── res/
│ │ │ │ ├── layout/ # XML layouts
│ │ │ │ ├── drawable/ # Vector drawables & images
│ │ │ │ ├── anim/ # Animations
│ │ │ │ ├── font/ # Custom fonts
│ │ │ │ ├── values/ # Strings, colors, styles
│ │ │ │ └── mipmap/ # App icons
│ │ │ ├── AndroidManifest.xml
│ │ │ └── assets/
│ │ ├── androidTest/ # Instrumented tests
│ │ └── test/ # Unit tests
│ ├── build.gradle.kts
│ ├── google-services.json # Firebase configuration
│ └── proguard-rules.pro
├── gradle/
│ ├── libs.versions.toml # Dependency versions
│ └── wrapper/
├── build.gradle.kts # Project-level build file
├── settings.gradle.kts
├── gradle.properties
├── gradlew # Gradle wrapper (Unix)
├── gradlew.bat # Gradle wrapper (Windows)
└── README.md
app/src/main/java/- Application source codeapp/src/main/res/- Application resources (layouts, drawables, strings)app/src/main/assets/- Raw asset filesapp/src/androidTest/- Instrumented tests (run on device)app/src/test/- Unit tests (run on JVM)gradle/- Gradle configuration and wrapper files
Before you begin, ensure you have the following installed:
-
Java Development Kit (JDK) 11 or higher
- Download: Oracle JDK or OpenJDK
-
Android Studio Hedgehog (2023.1.1) or later
- Download: Android Studio
-
Android SDK with the following components:
- Android SDK Platform 34 (Android 14)
- Android SDK Build-Tools 34.0.0
- Android Emulator (for testing)
- Firebase Account - Create one here
- Firebase Project - Set up a new Firebase project
- google-services.json - Download from Firebase Console
- Git - For version control
- Postman - For API testing (optional)
# Clone the repository
git clone https://github.com/yourusername/Readify-Android-App.git
# Navigate to project directory
cd Readify-Android-App-
Create Firebase Project
- Go to Firebase Console
- Click "Add Project"
- Follow the setup wizard
-
Add Android App to Firebase
- Click "Add App" → Select Android
- Package name:
com.example.readify - Download
google-services.json - Place it in
app/directory
-
Enable Firebase Services
- Authentication: Enable Email/Password sign-in
- Realtime Database: Create database in test/production mode
- Storage: Set up Firebase Storage with appropriate rules
-
Firebase Security Rules (Optional but Recommended)
Realtime Database Rules:
{ "rules": { "users": { "$uid": { ".read": "$uid === auth.uid", ".write": "$uid === auth.uid" } }, "books": { ".read": "auth != null", ".write": "auth != null" }, "categories": { ".read": "auth != null", ".write": "auth != null" } } }Storage Rules:
rules_version = '2'; service firebase.storage { match /b/{bucket}/o { match /pdfs/{allPaths=**} { allow read: if request.auth != null; allow write: if request.auth != null; } } }
# Open Android Studio
# File → Open → Select Readify-Android-App folder- Android Studio will automatically detect
build.gradle.kts - Click "Sync Now" when prompted
- Wait for Gradle sync to complete
If you're using the Retrofit API service, update the base URL in BookApi.java:
public interface BookApi {
String BASE_URL = "https://your-api-endpoint.com/";
// ... rest of the code
}Using Emulator:
- Tools → Device Manager
- Create Virtual Device (Recommended: Pixel 6, API 34)
- Click Run (
▶️ ) button
Using Physical Device:
- Enable Developer Options on your device
- Enable USB Debugging
- Connect device via USB
- Select device in Android Studio
- Click Run (
▶️ ) button
Edit app/build.gradle.kts to customize:
android {
namespace = "com.example.readify"
compileSdk = 34
defaultConfig {
applicationId = "com.example.readify"
minSdk = 24
targetSdk = 34
versionCode = 1
versionName = "1.0"
}
}For release builds, edit proguard-rules.pro:
# Keep Firebase classes
-keep class com.google.firebase.** { *; }
# Keep PDF Viewer classes
-keep class com.github.barteksc.pdfviewer.** { *; }
# Keep Retrofit
-keepattributes Signature
-keepattributes *Annotation*
-keep class retrofit2.** { *; }
Edit gradle.properties for build optimization:
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
org.gradle.parallel=true
org.gradle.caching=true
android.useAndroidX=true# Using Gradle Wrapper (Recommended)
./gradlew assembleDebug
# Output: app/build/outputs/apk/debug/app-debug.apk# Generate signed release APK
./gradlew assembleRelease
# Or create signed bundle
./gradlew bundleRelease
# Output: app/build/outputs/apk/release/app-release.apk- Build → Generate Signed Bundle / APK
- Select APK or Android App Bundle
- Create or choose existing keystore
- Fill in keystore credentials
- Select build variant (release)
- Click Finish
- debug - Development build with debugging enabled
- release - Production build with ProGuard/R8 optimization
# Run all unit tests
./gradlew test
# Run specific test class
./gradlew test --tests LibraryActivityTest# Run on connected device/emulator
./gradlew connectedAndroidTest
# Run specific test
./gradlew connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.example.readify.LoginTest- User registration with valid/invalid data
- Login with correct/incorrect credentials
- Password reset functionality
- Profile update operations
- Book upload and viewing
- Category creation and management
- Favorite books functionality
- PDF viewing and navigation
- Search functionality
- Network connectivity handling
- Offline mode behavior
We welcome contributions from the community! Here's how you can help:
-
Fork the Repository
# Click 'Fork' button on GitHub -
Create a Feature Branch
git checkout -b feature/amazing-feature
-
Make Your Changes
- Write clean, documented code
- Follow existing code style
- Add tests for new features
-
Commit Changes
git commit -m "Add: amazing feature description" -
Push to Branch
git push origin feature/amazing-feature
-
Open Pull Request
- Provide clear description
- Reference related issues
- Wait for review
Follow conventional commits:
feat:New featurefix:Bug fixdocs:Documentation changesstyle:Code style changes (formatting)refactor:Code refactoringtest:Test additions or changeschore:Build process or auxiliary tool changes
Example:
feat: add dark mode support to PDF viewer
fix: resolve crash on empty library
docs: update installation instructions
- Follow Google Java Style Guide
- Use meaningful variable and method names
- Add comments for complex logic
- Keep methods small and focused
- Use proper indentation (4 spaces)
- Code follows project style guidelines
- Self-review completed
- Comments added to complex code
- Documentation updated
- No new warnings generated
- Tests added/updated
- All tests passing
- Branch is up to date with main
Problem: Gradle sync fails with dependency resolution errors
Solutions:
# Clear Gradle cache
./gradlew clean
# Invalidate caches in Android Studio
File → Invalidate Caches → Invalidate and RestartProblem: App can't connect to Firebase
Solutions:
- Verify
google-services.jsonis inapp/directory - Check package name matches Firebase console
- Ensure internet permission in AndroidManifest.xml
- Verify Firebase services are enabled
Problem: PDF files won't display
Solutions:
- Check internet connectivity
- Verify Firebase Storage rules allow read access
- Ensure PDF URL is valid and accessible
- Check storage permissions in AndroidManifest.xml
Problem: Build fails with compilation errors
Solutions:
# Clean and rebuild
./gradlew clean build
# Check Java version
java -version # Should be 11 or higher
# Update Android Studio and SDK toolsProblem: Application crashes immediately after launch
Solutions:
- Check logcat for stack trace:
adb logcat | grep -i exception - Verify all required permissions
- Check Firebase initialization
- Ensure minimum SDK version compatibility
Problem: Login/signup not working
Solutions:
- Verify Firebase Authentication is enabled
- Check email/password provider is activated
- Ensure network connectivity
- Verify API key configuration
Problem: App crashes with OutOfMemoryError
Solutions:
- Increase heap size in
gradle.properties:org.gradle.jvmargs=-Xmx4096m - Optimize image resources
- Implement pagination for large lists
If you encounter issues not listed here:
-
Check Logcat: View detailed error logs
adb logcat -v time > logcat.txt
-
Search Issues: Check existing GitHub issues
-
Create New Issue: Provide:
- Android version
- Device model
- Steps to reproduce
- Logcat output
- Screenshots (if applicable)
-
Community Support: Join our Discord/Slack channel
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 Readify Development Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- Email: ttawhid401@gmail.com
- GitHub Issues: Report a bug
- Discussions: GitHub Discussions
Please use our Issue Template and include:
- Detailed description
- Steps to reproduce
- Expected vs actual behavior
- Screenshots or screen recordings
- Device and Android version
- Logcat output (if applicable)
We love hearing your ideas! Submit feature requests via:
- GitHub Discussions
- Tag with
enhancementlabel
For security issues, please email: ttawhid401@gmail.com
Do not create public issues for security vulnerabilities.
- Barteksc Android PDF Viewer - PDF rendering
- Firebase - Backend services
- Retrofit - HTTP client
- Gson - JSON processing
- Material Components - UI components
Thanks to all the amazing people who have contributed to this project!
- Inspired by modern reading apps and digital library management systems
- Special thanks to the Android developer community