Android Studio 3.3
Development Essentials
Android 9 Edition
Android Studio 3.3 Development Essentials Android 9 Edition
2019 Neil Smyth / Payload Media, Inc. All Rights Reserved.
This book is provided for personal use only. Unauthorized use, reproduction and/or distribution strictly prohibited. All rights reserved.
The content of this book is provided for informational purposes only. Neither the publisher nor the author offers any warranties or representation, express or implied, with regard to the accuracy of information contained in this book, nor do they accept any liability for any loss or damage arising from any errors or omissions.
This book contains trademarked terms that are used solely for editorial purposes and to the benefit of the respective trademark owner. The terms used within this book are not intended as infringement of any trademarks.
Rev: 1.0
Table of Contents
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 3.3 and Android 9, 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, camera access and the playback and recording of both video and audio. This edition of the book also covers printing, transitions and cloud-based file storage.
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 3.3 and Android 9 are also covered in detail including the Layout Editor, the ConstraintLayout and ConstraintSet classes, constraint chains and barriers, direct reply notifications and multi-window support.
Chapters also cover advanced features of Android Studio such as App Links, Instant Apps, 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:
https://www.ebookfrenzy.com/retail/androidstudio33/index.php
The steps to load a project from the code samples into Android Studio are as follows:
From the Welcome to Android Studio dialog, select the Open an existing Android Studio project option.
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:
https://www.ebookfrenzy.com/errata/androidstudio33.html
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.
2. Setting up an Android Studio Development Environment
Before any work can begin on the development of an Android application, the first step is to configure a computer system to act as the development platform. This involves a number of steps consisting of installing the Android Studio Integrated Development Environment (IDE) which also includes the Android Software Development Kit (SDK) and OpenJDK Java development environment.
This chapter will cover the steps necessary to install the requisite components for Android application development on Windows, macOS and Linux based systems.
2.1 System Requirements
Android application development may be performed on any of the following system types:
Windows 7/8/10 (32-bit or 64-bit)
macOS 10.10 or later (Intel based systems only)
Linux systems with version 2.19 or later of GNU C Library (glibc)
Minimum of 3GB of RAM (8GB is preferred)
Approximately 4GB of available disk space
1280 x 800 minimum screen resolution
2.2 Downloading the Android Studio Package
Most of the work involved in developing applications for Android will be performed using the Android Studio environment. The content and examples in this book were created based on Android Studio version 3.3 which, at the time writing is the current version.
Android Studio is, however, subject to frequent updates so a newer version may have been released since this book was published.
The latest release of Android Studio may be downloaded from the primary download page which can be found at the following URL:
https://developer.android.com/studio/index.html
If this page provides instructions for downloading a newer version of Android Studio it is important to note that there may be some minor differences between this book and the software. A web search for Android Studio 3.3 should provide the option to download the older version in the event that these differences become a problem.
2.3 Installing Android Studio
Once downloaded, the exact steps to install Android Studio differ depending on the operating system on which the installation is being performed.
2.3.1 Installation on Windows
Locate the downloaded Android Studio installation executable file (named android-studio-ide--windows. exe) in a Windows Explorer window and double-click on it to start the installation process, clicking the Yes button in the User Account Control dialog if it appears.