
Master clean architecture and solid principles in Android development with Jetpack Compose, feature-based packaging, Dagger Hilt, a local database as the source of truth, and Retrofit.
Clone the initial project from the GitHub repository using the version control system in android studio, then build the project to start with a ready-to-use setup.
Build an Android app with hot news categories, article viewing, search and favorites, and infinite paging, plus a side settings panel and a database as the single source of truth.
Walk through a clean architecture Android project, detailing modules, resources for countries and languages, a date formatter, and splash screen and compose setup.
Explore the solid principles for clean architecture, including the single responsibility principle, open-closed principle, Liskov substitution principle, interface segregation principle, and dependency inversion principle, with practical car examples.
Explore clean architecture in Android apps, with domain, use cases, presentation, data, and framework layers, and learn how top-down dependency flows and vertical slices enhance maintainability.
Discover how to use the newsapi.org api in the course, including obtaining an api key, and querying endpoints for everything, top headlines, and sources.
Test your API using Postman, explore endpoint filtering, send a request with an API key, view returned data, and copy the results to use in Android Studio.
Organize an Android project by creating core, data, and remote packages, adding a reusable components module, and converting json to Kotlin dtos with Kotlin serialization.
Set up a reusable domain contract and models to enable consistent data across features, support navigation to detail screens, and share core data like country and language.
Set up the headline feature package structure with domain, data, and local layers, wire up a mapper, and configure constants for api key, page size, and base url.
Define a headline api with retrofit, creating a suspend function to fetch headlines from a headline endpoint. Include api key and query parameters like category, country, language, and page size.
Create a local contract DTO as the core abstract data transfer object for local database models, including id, author, content, and other fields, used across local tables.
Create a new news article database class inside the local package, annotate with @Database and @Entity, set exportSchema to false, version to 1, and plan to revisit as data changes.
Create a headline dto data class in a models package, inherit from the contract dto, annotate it as an entity for headline table, and define primary key and column info.
Create a headline Dao with paging 3 integration to fetch all headlines, fetch a single headline by id, insert headlines with on conflict, and delete or update the favorite flag.
Create a headline mapper that converts a headline DTO to a news article by implementing the mapper interface, using values and the transfer function, and naming arguments for readability.
Implement the remote mediator load function to fetch headlines with paging, handle refresh and append paths, map articles to remote keys, and persist headlines and keys in the database.
Implement a headline mapper that converts a headline DTO to the model, supplying page and category from the headline mediator, and defaulting id to zero and favorite to false.
Explore error handling in a remote mediator by catching io exceptions and http errors, returning media result errors, and implementing key retrieval for accurate paging.
Implement paging key handling by retrieving remote keys for the first, closest, and last items using article urls as ids. Support refresh, prepend, and append with end-of-pagination checks.
Implement a headline repository that fetches headlines by category and language as paging data via a remote mediator, maps DTOs to domain articles, and updates favorites in the database.
Learn how to implement dependency injection with Dagger Hilt to provide a database, headline API, repository, and use cases, and organize DI for a Jetpack Compose Android app.
Refactor the presentation layer by moving the UI and main activity into a new core package named features presentation, consolidating the presentation core for cleaner architecture.
Create a home package with a view model and home state, initialize empty flow of headline articles from the domain model, and define an article category enum with default business.
Define the home ui events as a sealed class, adding a data class for article clicked and events for category change, preference panel change, and favorite change.
Create and initialize a home view model that loads articles and handles headline category, language, and country code, while updating headline favorites via use cases.
Create the home screen UI with a compose function, wire the home view model via hilt, and collect headline articles as lazy paging items inside a scaffold.
Create a home top bar component as a composable with actions like open drawer and on search, plus optional title image and content description for the user interface.
Create a headline item by adding an extension function to the lazy list scope, exposing headline content, a header title, and a lazy paging item for articles.
Explore building a header title component in Jetpack Compose, using a shared core package with a row layout, center-vertical alignment, and configurable padding, spacing, and title text styling.
Implement a header title item, use spacer and item spacing, display a list of items, and build a reusable news article item component in Jetpack Compose.
Create a headline item composable that accepts articles and article count, handles on view more and on favorite change, and implements a horizontal pager with auto scrolling and drag-aware navigation.
Fix the auto scrolling bug by stopping auto scrolling during user interaction and re-enabling it when the user stops, preserving paging with an isAutoScrolling toggle.
Implement a horizontal pager in Jetpack Compose, configure state, page size fill, and item spacing, and enable animated content changes for auto scrolling with a headline card example.
Learn to build a headline card by composing a private function and a composable, fetch article images with image request and crossfade, and toggle a favorite icon.
Connect the headline card to a horizontal pager by wiring article data, click and favorite handlers, and animated content changes for auto scrolling, then prepare a preview with sample articles.
Update the headline item extension function on the home screen by wiring article list handling, empty checks, and click, view more, and favorite changes in a Jetpack Compose UI.
Define a paging state with loading and error cases, render a loading spinner or log errors, and drive ui updates via a view model and home ui events.
Test the home UI, enable navigation by adding the Android entry point for dependency injection, create a new application class, register in the manifest, add internet permission, and rerun.
Provide article and headline mappers as bindings in the Dagger Hilt module, wire the headline mapper, and rerun the app; include an API key to avoid 401.
Apply clean architecture to build the discover feature on top of the established headline feature, leveraging a solid foundation from previous parts to easily integrate other features.
Develop the discover article data layer by creating local models, a data class, and entity annotations for the table discover article with primary key and auto generate.
Create a discover remote key table by defining a data class annotated with add entity and table name discover, with id as primary key and created at using current milliseconds.
Design and implement discover article daos to query sqlite by category, provide a paging source for details, fetch by id via flow, delete non-favorites by category, and update favorite state.
Implement the remote key dao for the discover key table with suspend inserts onConflict replace and article-id queries. Support category-based clears, latest creation time, and current category updates.
Implement a discover paging workflow using the paging 3 library and a remote mediator, defining the api, parameters, and discover article dto for seamless data loading.
Define a discover remote api interface with a companion object, set the top headlines endpoint using a get annotation, and pass required query parameters to fetch headlines.
Extend the discover remote mediator by adding discover entity and discover remote keys, implement initialize and load, enable experimental APIs, and manage cache timeout to decide on initial refresh.
Implement a paginated load function for the discover feed, handling refresh and prepend, performing API requests, mapping to DTOs, updating remote keys, and persisting articles.
Create and implement the discover repository to fetch and update categories and discover items, including favorites, using paging, a remote mediator, and DTO-to-domain mapping.
Fix the headline mapper by adding an article extension that builds a headline DTO from page and category via discover API. Configure a json converter, DI module, and repository wiring.
Create an add module and a json converter in the ai package, configure content type and ignore unknown keys, and provide the discover api with retrofit and converter factory.
Define and wire discover use cases, including fetch, get (discover category), update category and favorite, and insert, then expose them via a module to support the discover UI.
Extend the home viewmodel to load discover articles, handle category changes (defaulting to sports), and persist the selected category via discover use cases and a viewModelScope launch.
Implement the discover item extension on home screen. Wire the home, categories, and discover articles with a coroutine scope and snack bar state, using an int id and returning unit.
Learn to build discover chips in Jetpack Compose using a lazy row, input chips, and selection state, with pagination loading, snackbar feedback, and a circular progress indicator.
Create a reusable news article item composable in the core package for multiple screens, using Coil for image loading and a clickable card layout with a favorite control.
Fixes to category loading logic optimize fetching all available categories with a distinct query, caching results in the database, and conditionally triggering a remote refresh via the remote mediator.
Set up navigation for the app, enabling transitions from the home screen to the detail screen, including tapping a headline item to reach details.
Define navigation with a sealed UI screens class, outlining routes for home, headline, discover, and detail (with arguments) and navigation actions for transitions in a Jetpack Compose Android app.
Create reusable navigation actions using lambda functions and a navigation extension for single top and back stack management, including state restoration in nested graphs with routes.
Define navigation graphs with a nav controller, set home as start destination, and navigate to headline, detail, and discover screens while passing an item id to the detail screen.
Create a separate newsy app as the top-level composable, hoist state, pass the nav controller as a parameter, and wire a navigation graph.
Create a detail feature in clean architecture, wiring domain and data models, a detail dto, and reading-time logic that estimates words per minute from content.
Create a detail dao package with a @Dao annotated interface and a suspend function getHeadline(id). Implement Room queries to fetch headline, discover, and search articles by id.
Define domain detail entities by modeling article metadata, author metadata, and an id with default zero. Create a list of paragraph strings and use a delimiter to parse content.
Define the detail repository to fetch headline by article ID, returning a flow of a resource holder; create a utility resource sealed class to encapsulate data states.
Explore the resource holder class as a generic architecture for managing resource states—success with data, error with throwable, and loading—in Jetpack Compose apps.
Implement a detail repository using a callback flow to emit loading and detail data, use an extension function to transform to detail dtos, and convert dao results to detail dtos.
Create a new detail module, provide a singleton detailed repository via a DAO and news article database, and assemble detail and discover article use cases, then build the project.
Implement detail state and a hilt-injected detail view model to fetch article data, manage UI state and routes, and restore state with saved state handle for the details screen.
Design and implement a detail screen with a Hilt view model, handling loading, error, and success states, and hoisting state into a stateless composable in Jetpack Compose.
Implement a detailed screen in Jetpack Compose by configuring the top bar, navigation content, article content, and scroll behavior, wiring back navigation and icon button interactions for the article view.
Navigate the app with a navigation graph and detail screen, passing int and string arguments and handling back navigation.
Annotate the view model with a tilt view model to manage headline state, fetch the country and language codes, initialize the headline article, and cache results in view model scope.
Create a headline screen composable wired to the headline view model using hilt, display articles with lazy paging items, handle item clicks and favorite toggles, and integrate pagination state.
Create a new composable to handle item clicks and navigate to detail screen via the item id and headline screen route; verify the view more navigation to news screen.
Introduce the search functionality and set up a new package to begin implementing the feature when users click search.
Define a Retrofit API service for the search endpoint version two, implement a suspend get function with query parameter q and API key, and return a search DTO.
Implement paging with a search remote mediator by extending remote mediator, wiring in a search store and search remote key, and enforcing a five-minute cache timeout with initial refresh.
Implement a search paging load function in a remote mediator to handle refresh, prepend, and append, fetch articles via API with a query and page, and handle end of pagination.
Explore building a search repository in a clean architecture setup, implementing API mapping, paging with a paging config, a remote mediator, and database integration to fetch and update favorite articles.
Develop the domain use cases package, implement an invoke function to update an article via the repository’s update favorite, and model a use case container as a data class.
Develop search module by wiring Json converter and converter factory, ignoring unknown keys, and a repository with use cases and a search api; build search screen with result navigation.
Create a search package and implement search events with a sealed class, including answer change, submit, search, save search history, clear search history, and on favorite change.
Define a search view model with a state data class and article history, wire in use cases, implement on search events, update favorites and history, and build the search screen.
Explore search screen implementation in modern android dev with clean architecture and jetpack compose. Build a stateful screen using a view model, material 3 search bar, and lazy paging items.
Fix the search paging logic in the mediator by launching an initial refresh when the query changes, comparing it to the database, and fetching fresh data.
Implement a modal drawer to enable navigation between the favorite and settings screens and advance toward completing the app.
Refactor a new Android app by building a navigation drawer composable in the core package, wiring callbacks for home, settings, and favorites, with a default modifier and a logo.
Create a reusable newsy logo composable with a logo and watermark. Configure the drawer with an icon, an image vector, padding, and navigate home.
Craft Modern, High-Performance Android Apps with Jetpack Compose and Clean Architecture
Ready to level up your Android development game? This comprehensive course teaches you how to build robust, scalable, and performance-optimized apps using the latest advancements in Android development: Jetpack Compose for stunning UIs and SOLID principles for clean and maintainable code.
Here's what you'll get:
Master Jetpack Compose: From the fundamentals to advanced techniques, you'll gain the expertise to create breathtaking and responsive UIs with Compose. Build layouts, master theming, and even implement stunning animations.
Solidify your Android Architecture: Deep dive into the SOLID principles and learn how to apply them effectively in your projects. This will lead to a cleaner, more organized, and easier-to-maintain codebase.
Network Like a Pro: Leverage Retrofit to seamlessly fetch data from external sources. Learn to handle API requests and responses efficiently, building a robust and reliable networking layer for your apps.
Effortless Dependency Management: Explore Dagger Hilt and discover how to manage dependencies effortlessly. This ensures modular and well-tested code, making your development process smoother and more efficient.
Image Loading Made Simple: Implement Coil, a modern image-loading library, to optimize image display in your app. Ensure fast and efficient loading of images, enhancing the user experience.
Master Pagination with Paging 3: Learn to seamlessly handle pagination in your app using the latest Paging 3 library. This will create a smooth and user-friendly experience for navigating large datasets.
Beyond the knowledge, you'll also:
Build a fully functional news app called Newsy: Apply the learned concepts to create a practical application, putting your skills into action.
Utilize the latest tools and libraries: Gain proficiency in essential tools like Retrofit, Dagger Hilt, Coil, and Paging 3, making you a well-rounded Android developer.
By the end of this course, you'll be equipped with the knowledge and skills to build modern, high-performing, and scalable Android apps with confidence.
Enrol now and take your Android development skills to the next level!