Android Studio 4.0 Development Essentials - Java Edition

By Neil Smyth
    What do you get with a Packt Subscription?

  • Instant access to this title and 7,500+ eBooks & Videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. Free Chapter
    1. Introduction
About this book

Android rolls out frequent updates to meet the demands of the dynamic mobile market and to enable its developer community to lead advancements in application development. This book focuses on the updated features of Android Studio (the fully integrated development environment launched by Google) to build reliable Android applications using Java.

The book starts by outlining the steps necessary to set up an Android development and testing environment. You’ll then learn how to create user interfaces with the help of Android Studio Layout Editor, XML files, and by writing the code in Java. The book introduces you to Android architecture components and advanced topics such as intents, touchscreen handling, gesture recognition, multi-window support integration, and biometric authentication, and lets you explore key features of Android Studio 4.0, including the layout editor, direct reply notifications, and dynamic delivery. You’ll also cover Android Jetpack in detail and create a sample app project using the ViewModel component. Finally, you’ll upload your app to the Google Play Console and handle the build process with Gradle.

By the end of this book, you’ll have gained the skills necessary to develop applications using Android Studio 4.0 and Java.

Publication date:
September 2020


1. Introduction

In 2018 Google introduced Android Jetpack to the developer community. Designed to make it quicker and easier to develop modern and reliable Android apps, Jetpack consists of a set of tools, libraries and architectural guidelines. The main elements of Android Jetpack consist of the Android Studio Integrated Development Environment (IDE), the Android Architecture Components and the Modern App Architecture Guidelines, all of which are covered in this latest edition of Android Studio Development Essentials.

Fully updated for Android Studio 4.0, the goal of this book is to teach the skills necessary to develop Android based applications using the Java programming language.

Beginning with the basics, this book provides an outline of the steps necessary to set up an Android development and testing environment. An overview of Android Studio is included covering areas such as tool windows, the code editor and the Layout Editor tool. An introduction to the architecture of Android is followed by an in-depth look at the design of Android applications and user interfaces using the Android Studio environment.

Chapters are also included covering the Android Architecture Components including view models, lifecycle management, Room database access, app navigation, live data and data binding.

More advanced topics such as intents are also covered, as are touch screen handling, gesture recognition, and the recording and playback of audio. This edition of the book also covers printing, transitions, cloud-based file storage and foldable device support.

The concepts of material design are also covered in detail, including the use of floating action buttons, Snackbars, tabbed interfaces, card views, navigation drawers and collapsing toolbars.

In addition to covering general Android development techniques, the book also includes Google Play specific topics such as implementing maps using the Google Maps Android API, and submitting apps to the Google Play Developer Console.

Other key features of Android Studio 4.0 and Android are also covered in detail including the Layout Editor, the ConstraintLayout and ConstraintSet classes, MotionLayout Editor, view binding, constraint chains, barriers and direct reply notifications.

Chapters also cover advanced features of Android Studio such as App Links, Dynamic Delivery, the Android Studio Profiler and Gradle build configuration.

Assuming you already have some Java programming experience, are ready to download Android Studio and the Android SDK, have access to a Windows, Mac or Linux system and ideas for some apps to develop, you are ready to get started.


1.1 Downloading the Code Samples

The source code and Android Studio project files for the examples contained in this book are available for download at:

The steps to load a project from the code samples into Android Studio are as follows:

1. From the Welcome to Android Studio dialog, select the Open an existing Android Studio project option.

2. In the project selection dialog, navigate to and select the folder containing the project to be imported and click on OK.


1.2 Feedback

We want you to be satisfied with your purchase of this book. If you find any errors in the book, or have any comments, questions or concerns please contact us at


1.3 Errata

While we make every effort to ensure the accuracy of the content of this book, it is inevitable that a book covering a subject area of this size and complexity may include some errors and oversights. Any known issues with the book will be outlined, together with solutions, at the following URL:

In the event that you find an error not listed in the errata, please let us know by emailing our technical support team at They are there to help you and will work to resolve any problems you may encounter.

About the Author
  • Neil Smyth

    Neil Smyth has over 25 years of experience in the IT industry, including roles in software development and enterprise-level UNIX and Linux system administration. In addition to a bachelor’s degree in information technology, he also holds A+, Security+, Network+, Project+, and Microsoft Certified Professional certifications and is a CIW Database Design Specialist. Neil is the co-founder and CEO of Payload Media, Inc. (a technical content publishing company), and the author of the Essentials range of programming and system administration books.

    Browse publications by this author
Android Studio 4.0 Development Essentials - Java Edition
Unlock this book and the full library FREE for 7 days
Start now