Android Studio 4.2 Development Essentials - Java Edition
eBook - ePub

Android Studio 4.2 Development Essentials - Java Edition

  1. 782 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Android Studio 4.2 Development Essentials - Java Edition

About this book

Developing Android applications using Android Studio 4.2, Java, and Android JetpackKey Features• Design complex and responsive user interface layouts with the Android Studio 4.2 IDE• Build view model-based apps using the Jetpack architecture and use the latest Material Design components to build modern user interface designs• Integrate with SQLite databases and the Android Room Persistence LibraryBook DescriptionAndroid Studio is an Integrated Development Environment based on the JetBrains IntelliJ IDEA. It provides developers with a unique platform to design and develop Android apps using various developer tools. The new Android Studio 4.2 has an upgraded IntelliJ platform and a variety of new features designed to improve the productivity of Android app developers. Fully updated for Android Studio 4.2, the objective of this book is to help you master the skills necessary to develop Android applications using Java as the programming language. This book begins by outlining the steps necessary to set up an Android development and testing environment and introducing programming in Java, describing data types, flow control, functions, lambdas, and object-oriented programming. It includes an overview of Android Studio, covering areas such as tool windows, the code editor, and the Layout Editor tool. An introduction to Android architecture is followed by an in-depth explanation of the design of Android applications and user interfaces using the Android Studio environment. Early chapters detail Android Architecture components like view models, lifecycle management, Room database access, the Database Inspector, app navigation, live data, and data binding. Advanced topics such as intents are also covered, as are touch screen handling, gesture recognition, and the recording and playback of audio. You will also explore printing, transitions, cloud-based file storage, and foldable device support. Detailed descriptions of the concepts of material design are provided, including the use of floating action buttons, Snackbars, tabbed interfaces, card views, navigation drawers, and collapsing toolbars. Some key features of Android Studio 4.2 and Android discussed in-depth include the Layout Editor, the ConstraintLayout and ConstraintSet classes, MotionLayout Editor, view binding, constraint chains, barriers, and direct reply notifications. Later chapters cover advanced features of Android Studio such as App Links, Dynamic Delivery, the Android Studio Profiler, Gradle build configuration, and submitting apps to the Google Play Developer Console.What you will learn• Install and configure Android Studio on Windows, macOS, and Linux• Learn to code using Java programming language• Understand Android architecture and app lifecycle• Animate your user interfaces using Android MotionLayout• Monitor app performances using the Android Studio Profiler tool• Add printing support from within your own appsWho this book is forThis book is for anyone who wants to learn Android application development. Existing Android developers who want to upgrade their skills and get into the Kotlin ecosystem.To get the most from this book, you should have some previous programming experience. You will be required to download Android Studio and the Android SDK for this course. Make sure you have access to a Windows, Mac, or Linux system and some creative app ideas to develop.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Android Studio 4.2 Development Essentials - Java Edition by Neil Smyth in PDF and/or ePUB format, as well as other popular books in Computer Science & Application Development. We have over one million books available in our catalogue for you to explore.
1. Introduction
Fully updated for Android Studio 4.2, 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, the Database Inspector, 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.
Other key features of Android Studio 4.2 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, Gradle build configuration, and submitting apps to the Google Play Developer Console.
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/androidstudio42/index.php
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 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 [email protected].
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/androidstudio42.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 [email protected]. 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 though the Android emulator will only run on 64-bit systems)
•macOS 10.10 or later (Intel based systems only)
•ChromeOS device with Intel i5 or higher and minimum 8GB of RAM
•Linux systems with version 2.19 or later of GNU C Library (glibc)
•Minimum of 4GB 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 ...

Table of contents

  1. 1. Introduction
  2. 2. Setting up an Android Studio Development Environment
  3. 3. Creating an Example Android App in Android Studio
  4. 4. Creating an Android Virtual Device (AVD) in Android Studio
  5. 5. Using and Configuring the Android Studio AVD Emulator
  6. 6. A Tour of the Android Studio User Interface
  7. 7. Testing Android Studio Apps on a Physical Android Device
  8. 8. The Basics of the Android Studio Code Editor
  9. 9. An Overview of the Android Architecture
  10. 10. The Anatomy of an Android Application
  11. 11. An Overview of Android View Binding
  12. 12. Understanding Android Application and Activity Lifecycles
  13. 13. Handling Android Activity State Changes
  14. 14. Android Activity State Changes by Example
  15. 15. Saving and Restoring the State of an Android Activity
  16. 16. Understanding Android Views, View Groups and Layouts
  17. 17. A Guide to the Android Studio Layout Editor Tool
  18. 18. A Guide to the Android ConstraintLayout
  19. 19. A Guide to Using ConstraintLayout in Android Studio
  20. 20. Working with ConstraintLayout Chains and Ratios in Android Studio
  21. 21. An Android Studio Layout Editor ConstraintLayout Tutorial
  22. 22. Manual XML Layout Design in Android Studio
  23. 23. Managing Constraints using Constraint Sets
  24. 24. An Android ConstraintSet Tutorial
  25. 25. A Guide to using Apply Changes in Android Studio
  26. 26. An Overview and Example of Android Event Handling
  27. 27. Android Touch and Multi-touch Event Handling
  28. 28. Detecting Common Gestures Using the Android Gesture Detector Class
  29. 29. Implementing Custom Gesture and Pinch Recognition on Android
  30. 30. An Introduction to Android Fragments
  31. 31. Using Fragments in Android Studio - An Example
  32. 32. Modern Android App Architecture with Jetpack
  33. 33. An Android Jetpack ViewModel Tutorial
  34. 34. An Android Jetpack LiveData Tutorial
  35. 35. An Overview of Android Jetpack Data Binding
  36. 36. An Android Jetpack Data Binding Tutorial
  37. 37. An Android ViewModel Saved State Tutorial
  38. 38. Working with Android Lifecycle-Aware Components
  39. 39. An Android Jetpack Lifecycle Awareness Tutorial
  40. 40. An Overview of the Navigation Architecture Component
  41. 41. An Android Jetpack Navigation Component Tutorial
  42. 42. An Introduction to MotionLayout
  43. 43. An Android MotionLayout Editor Tutorial
  44. 44. A MotionLayout KeyCycle Tutorial
  45. 45. Working with the Floating Action Button and Snackbar
  46. 46. Creating a Tabbed Interface using the TabLayout Component
  47. 47. Working with the RecyclerView and CardView Widgets
  48. 48. An Android RecyclerView and CardView Tutorial
  49. 49. A Layout Editor Sample Data Tutorial
  50. 50. Working with the AppBar and Collapsing Toolbar Layouts
  51. 51. An Android Studio Primary/Detail Flow Tutorial
  52. 52. An Overview of Android Intents
  53. 53. Android Explicit Intents – A Worked Example
  54. 54. Android Implicit Intents – A Worked Example
  55. 55. Android Broadcast Intents and Broadcast Receivers
  56. 56. A Basic Overview of Java Threads, Handlers and Executors
  57. 57. An Overview of Android Services
  58. 58. Implementing an Android Started Service – A Worked Example
  59. 59. Android Local Bound Services – A Worked Example
  60. 60. Android Remote Bound Services – A Worked Example
  61. 61. An Android Notifications Tutorial
  62. 62. An Android Direct Reply Notification Tutorial
  63. 63. Foldable Devices and Multi-Window Support
  64. 64. An Overview of Android SQLite Databases
  65. 65. The Android Room Persistence Library
  66. 66. An Android TableLayout and TableRow Tutorial
  67. 67. An Android Room Database and Repository Tutorial
  68. 68. Accessing Cloud Storage using the Android Storage Access Framework
  69. 69. An Android Storage Access Framework Example
  70. 70. Video Playback on Android using the VideoView and MediaController Classes
  71. 71. Android Picture-in-Picture Mode
  72. 72. An Android Picture-in-Picture Tutorial
  73. 73. Making Runtime Permission Requests in Android
  74. 74. Android Audio Recording and Playback using MediaPlayer and MediaRecorder
  75. 75. Working with the Google Maps Android API in Android Studio
  76. 76. Printing with the Android Printing Framework
  77. 77. An Android HTML and Web Content Printing Example
  78. 78. A Guide to Android Custom Document Printing
  79. 79. An Introduction to Android App Links
  80. 80. An Android Studio App Links Tutorial
  81. 81. A Guide to the Android Studio Profiler
  82. 82. An Android Biometric Authentication Tutorial
  83. 83. Creating, Testing and Uploading an Android App Bundle
  84. 84. An Overview of Android Dynamic Feature Modules
  85. 85. An Android Studio Dynamic Feature Tutorial
  86. 86. An Overview of Gradle in Android Studio
  87. Index