Reader small image

You're reading from  Kickstart Modern Android Development with Jetpack and Kotlin

Product typeBook
Published inMay 2022
Reading LevelBeginner
PublisherPackt
ISBN-139781801811071
Edition1st Edition
Languages
Right arrow
Author (1)
Catalin Ghita
Catalin Ghita
author image
Catalin Ghita

Catalin Ghita is a Udemy Instructor and an Android Engineer proficient in Native Android Development, while also being active in Cross-platform development with React-Native and Flutter. He successfully built, deployed, and maintained huge scalable apps with millions of downloads and active users for industry giants like Burger King, Carrefour or Bankinter. He is designated to architect huge applications into scalable, maintainable and testable form and shapes. As the owner of the Coding Troops blog and Udemy instructor, he wrote articles and taught courses reaching tens of thousands of students, thereby exposing and clarifying concepts and subtleties on hot topics in Android.
Read more about Catalin Ghita

Right arrow

Preface

With Jetpack libraries, you can build and design high-quality, robust Android apps that have an improved architecture and work consistently across different versions and devices. This book will help you understand how Jetpack allows developers to follow best practices and architectural patterns when building Android apps while also eliminating boilerplate code.

Developers working with Android and Kotlin will be able to put their knowledge to work with this condensed practical guide to building apps with the most popular Jetpack libraries, including Jetpack Compose, ViewModel, Hilt, Room, Paging, Lifecycle, and Navigation. You'll gain an overview of relevant libraries and architectural patterns, including popular libraries in the Android ecosystem such as Retrofit, Coroutines, and Flow while building modern applications with real-world data.

By the end of this Android app development book, you'll have learned how to leverage Jetpack libraries and your knowledge of architectural concepts to build, design, and test robust Android applications for various use cases.

Who this book is for

This book is for junior and intermediate-level Android developers looking to level up their Android development skills to develop high-quality apps using Jetpack libraries and other cutting-edge technologies. Beginners with basic knowledge of Android development fundamentals will also find this book useful. Familiarity with Kotlin is assumed.

What this book covers

Chapter 1, Creating a Modern UI with Jetpack Compose, covers the new declarative way of building a UI on Android with the Jetpack Compose toolkit, while also starting to build an application from scratch with this new framework.

Chapter 2, Handling UI State with Jetpack ViewModel, explores the concept and usage of the ViewModel architecture component, as well as the concept of UI state in Compose apps and how the ViewModel can handle and cache such state.

Chapter 3, Displaying Data from REST APIs with Retrofit, covers what Retrofit is and how it can be used as a networking client for Android inside the project developed throughout the book.

Chapter 4, Handling Async Operations with Coroutines, covers the core concepts behind Kotlin coroutines. The chapter explores what a coroutine is, what suspend functions are, and other important components of coroutines.

Chapter 5, Adding Navigation in Compose with Jetpack Navigation, covers the basics of navigation between Compose-based screens with the help of the Jetpack Navigation library, while also exploring how to support deep links to your Compose UI.

Chapter 6, Adding Offline Capabilities with Jetpack Room, introduces Room as a solution for storing structured data and explores data persistence on Android as an architectural decision in building robust apps.

Chapter 7, Introducing Presentation Patterns in Android, explores architectural presentation patterns and why they are needed while also analyzing MVC, MVP, and MVVM.

Chapter 8, Getting Started with Clean Architecture in Android, explores how clean architecture translates into Android and how you can separate business logic by implementing Use Cases in the project developed throughout the book.

Chapter 9, Implementing Dependency Injection with Jetpack Hilt, explores what dependency injection is, why it's needed, and the advantages that it brings. This chapter also explores the basics of Dagger and introduces Jetpack Hilt.

Chapter 10, Test Your App with UI and Unit Tests, explores why tests are important and splits them into two main categories: UI and unit tests. In this chapter, you will learn how to test the Compose UI and application logic by creating unit tests.

Chapter 11, Creating Infinite Lists with Jetpack Paging and Kotlin Flow, explores the concept of pagination and explains how to integrate pagination on Android with the help of Jetpack Paging, while also using Kotlin Flow.

Chapter 12, Exploring the Jetpack Lifecycle Components, explores the inner workings of components that are part of Jetpack Lifecycle such as ViewModel and LiveData. In this chapter, you will also learn how to create your own lifecycle-aware component.

To get the most out of this book

You will need a version of Android Studio installed on your computer – the 2020.3.1 version or newer.

All code examples have been tested using Kotlin 1.6.10 and Android Studio 2020.3.1 on macOS and Windows.

Familiarity with Kotlin and the basics of Android is assumed.

For part of Chapter 3, Displaying Data from REST APIs with Retrofit, it's expected that you have a Google account.

For part of Chapter 6, Adding Offline Capabilities with Jetpack Room, it's expected that you have minimal knowledge of SQL databases and queries.

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book's GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Kickstart-Modern-Android-Development-with-Jetpack-and-Kotlin. If there's an update to the code, it will be updated in the GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781801811071_ColorImages.pdf.

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Text is the Compose version of our old and beloved TextView."

A block of code is set as follows:

@Composable 
fun FriendlyMessage(name: String) { 
   Text(text = "Greetings $name!") 
}

When we wish to draw your attention to a particular part of a code block meaning that a portion of code has been added or modified, the relevant lines or items are set in bold:

@Composable 
fun ColoredBox() { 
   Box(modifier = Modifier.size(120.dp)) 
}

Any command-line input or output is written as follows:

npm install component_name

Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: "In the Phone and tablet template section, select Empty Compose Activity and then choose Next."

Tips or Important Notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, email us at customercare@packtpub.com and mention the book title in the subject of your message.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at copyright@packt.com with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Share Your Thoughts

Once you've read In-Memory Analytics with Apache Arrow, we'd love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we're delivering excellent quality content.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Kickstart Modern Android Development with Jetpack and Kotlin
Published in: May 2022Publisher: PacktISBN-13: 9781801811071
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Catalin Ghita

Catalin Ghita is a Udemy Instructor and an Android Engineer proficient in Native Android Development, while also being active in Cross-platform development with React-Native and Flutter. He successfully built, deployed, and maintained huge scalable apps with millions of downloads and active users for industry giants like Burger King, Carrefour or Bankinter. He is designated to architect huge applications into scalable, maintainable and testable form and shapes. As the owner of the Coding Troops blog and Udemy instructor, he wrote articles and taught courses reaching tens of thousands of students, thereby exposing and clarifying concepts and subtleties on hot topics in Android.
Read more about Catalin Ghita