Part 1: Introduction and Project Setup
🌟 Welcome to the comprehensive guide on building an Android audio book reading and listening app using modern development frameworks such as Jetpack Compose, Kotlin, Kotlin Coroutines, Lifecycle, KTOR, Firebase, and more. This series aims to provide a step-by-step walkthrough of developing a feature-rich app, demonstrating the implementation of Clean Architecture and MVI design patterns in today’s Android development landscape.
By the culmination of this series, we aim to develop a sophisticated audiobook Android application featuring a comprehensive set of functionalities. The key features of the app include:
- Onboarding Screen: Introduces users to the app and provides a smooth initiation process.
- Login Screen: Facilitates secure user authentication, ensuring a personalized experience.
- Home Screen: Display a list of popular and recommended books. Allow users to resume reading from where they left off.
- Search Screen: Enables users to explore books by searching for authors and categories.
- Favorites Screen: Allows users to curate a personalized collection of favorite books.
- Book Summary: Offers detailed information about each book, assisting users in making informed choices.
- Book Reader: Empowers users to seamlessly switch between reading and listening modes for any selected book.
- Profile Screen: Displays user-specific details, providing a personalized touch and an option for logging out.
Kotlin, Kotlin Coroutines and Flow
KTOR Client for handling REST APIs
Firebase Authentication to authenticate users
Data Store & Room
For those who have embarked on the development journey, I’d like to share that certain features of the audiobook Android app are already in place and readily available on GitHub.
If you prefer a hands-on approach, you can initiate a new Android Studio project and follow along with the coding process. Alternatively, for those seeking a quicker start, you have the convenience of cloning the existing project from the designated GitHub repository.
git clone https://github.com/waseemabbas8/libroom-android.git
The folder hierarchy in the above image is based on the Clean Architecture pattern, which is a popular approach to structuring Android apps. The Clean Architecture pattern separates the app into layers based on their level of abstraction, so that the inner layers are independent of the outer layers. This makes the app more maintainable and testable.
1. Root folder — the package name folder
This folder contains the main application class (
LIBroomApplication) and the
MainViewModel. Other than this it contains
LIBroomApplication is responsible for initializing the app and setting up the dependency injection with the Hilt. The
MainActivity is the entry point for the app.
2. Feature folder
This folder contains subfolders for each feature of the app. In this example, there are features for
search.Each feature folder contains subfolders for the data, domain, and presentation layers. Also, note I have managed a separate Hilt DI module for each feature.
3. Core folder
This is the beating heart of the app. All application-level classes that can be consumed in different modules of the app are placed under this directory. For example, it contains, networking classes (KTOR Client or Firebase, etc.), composeables that are shared between multiple features, base classes, and theming of the app.
I am pleased to inform you that advancements in the development of the audiobook Android app are well underway. The next segments of the article, detailing subsequent stages of the project, are currently in progress and will soon be made available for your perusal.
Dear you, thanks for reading this article. I would love to hear your opinion in the comment section. I would like to extend special thanks to Ryan Simon for guiding me in learning MVI and empowering my architectural skills.