The Busy Coder's Guide to Android Development


The Busy Coder’s Guide to Android Development was CommonsWare’s original book on Android app development. Updated several times a year for a decade, it covers both ordinary Android app development and a lot of specialty areas, such as support for external displays.

As with the rest of the first-generation books, its examples are in Java and do not use the Jetpack libraries. This book is useful for some of the advanced topics that it covers, but for ordinary Android app development, you will be better served reading a second-generation book, such as Elements of Android Jetpack or Exploring Android.

This book is published in PDF, EPUB, and MOBI/Kindle formats, for use in your favorite digital book reader.

Details

  • FINAL Version
  • 4,298 pages
  • Supports Android 9.0 and Android Studio 3.1
  • Source code
  • Errata

The Table of Contents

Each bullet shown below represents a chapter. Use the search field in the nav bar to search all of the CommonsWare books to see what they hold!

  • Key Android Concepts
  • Choosing Your Development Toolchain
  • Tutorial #1 - Installing the Tools
  • Android and Projects
  • Tutorial #2 - Creating a Stub Project
  • Getting Around Android Studio
  • Contents of Android Projects
  • Introducing Gradle and the Manifest
  • Tutorial #3 - Manifest Changes
  • Some Words About Resources
  • Icons
  • Tutorial #4 - Adjusting Our Resources
  • The Theory of Widgets
  • The Android User Interface
  • Basic Widgets
  • Debugging Your App
  • The Classic Container Classes
  • Other Common Widgets and Containers
  • Tutorial #5 - Creating a Layout
  • GUI Building, Continued
  • AdapterViews and Adapters
  • The WebView Widget
  • Defining and Using Styles
  • Dependencies
  • Tutorial #6 - Adding a Library
  • Introducing ConstraintLayout
  • RecyclerView
  • The Action Bar
  • Vector Drawables
  • Tutorial #7 - Setting Up the Action Bar
  • Android’s Process Model
  • Activities and Their Lifecycles
  • Tutorial #8 - Setting Up An Activity
  • The Tactics of Fragments
  • Tutorial #9 - Starting Our Fragments
  • Swiping with ViewPager
  • Tutorial #10 - Rigging Up a ViewPager
  • Resource Sets and Configurations
  • Material Design Basics
  • Dealing with Threads
  • Requesting Permissions
  • Assets, Files, and Data Parsing
  • Tutorial #11 - Adding Simple Content
  • Tutorial #12 - Displaying the Book
  • Using Preferences
  • Tutorial #13 - Using Some Preferences
  • SQLite Databases
  • Tutorial #14 - Saving Notes
  • Internet Access
  • Intents, Intent Filters
  • Broadcasts and Broadcast Receivers
  • Tutorial #15 - Sharing Your Notes
  • Services and the Command Pattern
  • Tutorial #16 - Updating the Book
  • Tutorial #17 - Supporting Large Screens
  • Backwards Compatibility Strategies and Tactics
  • System Services
  • Google Play Services
  • Getting Help
  • Working with Library Modules
  • Gradle and Tasks
  • Gradle Build Variants
  • Manifest Merger Rules
  • Signing Your App
  • Distribution
  • Writing a Gradle Plugin
  • Code Generation
  • Advanced Gradle for Android Tips
  • Testing with JUnit4
  • Testing with Espresso
  • Testing with UI Automator
  • Measuring Test Coverage
  • Unit Testing
  • MonkeyRunner and the Test Monkey
  • Java 8 Lambda Expressions
  • Rx Basics
  • Notifications
  • Advanced Notifications
  • Multi-Window Support
  • Advanced ConstraintLayout
  • GridLayout
  • Dialogs and DialogFragments
  • Advanced ListViews
  • Action Modes
  • Other Advanced Action Bar Techniques
  • Toolbar
  • AppCompat: The Official Action Bar Backport
  • The Android Design Support Library
  • Advanced RecyclerView
  • Advanced Uses of WebView
  • The Input Method Framework
  • Fonts and Text
  • Rich Text
  • Animators
  • Legacy Animations
  • Custom Drawables
  • Mapping with Maps V2
  • Crafting Your Own Views
  • Advanced Preferences
  • Custom Dialogs and Preferences
  • Progress Indicators
  • More Fun with Pagers
  • Focus Management and Accessibility
  • Miscellaneous UI Tricks
  • Event Bus Alternatives
  • Tasks
  • The Assist API (“Now On Tap”)
  • The Autofill API
  • The Data Binding Framework
  • Drag and Drop
  • Keyboard and Mouse Input
  • Viewing PDFs
  • Home Screen App Widgets
  • Adapter-Based App Widgets
  • Publishing Slices
  • Hosting Slices
  • Advanced Permissions
  • Restricted Profiles and UserManager
  • Device Authentication
  • Keys and the Keystore
  • Miscellaneous Security Techniques
  • Content Provider Theory
  • Content Provider Implementation Patterns
  • The Loader Framework
  • The ContactsContract and CallLog Providers
  • The CalendarContract Provider
  • The MediaStore Provider
  • Consuming Documents
  • Providing Documents
  • Encrypted Storage
  • Packaging and Distributing Data
  • Advanced Database Techniques
  • Data Backup
  • SSL
  • NetCipher
  • Miscellaneous Network Topics
  • Audio Playback
  • Audio Recording
  • Video Playback
  • Using the Camera via 3rd-Party Apps
  • Working Directly with the Camera
  • Media Routes
  • Supporting External Displays
  • Google Cast and Chromecast
  • The “Ten-Foot UI”
  • Putting the TVs All Together: Decktastic
  • Creating a MediaRouteProvider
  • The Media Projection APIs
  • AlarmManager and the Scheduled Service Pattern
  • PowerManager and WakeLocks
  • JobScheduler
  • Accessing Location-Based Services
  • The Fused Location Provider
  • Working with the Clipboard
  • Telephony
  • Working With SMS
  • NFC
  • Device Administration
  • Basic Use of Sensors
  • Printing and Document Generation
  • Basic Bluetooth RFCOMM
  • Dealing with Different Hardware
  • Writing and Using Parcelables
  • Responding to URLs
  • App Shortcuts
  • PackageManager Tricks
  • Remote Services and the Binding Pattern
  • Advanced Manifest Tips
  • Miscellaneous Integration Tips
  • Android Studio Editors and Dialogs
  • Advanced Emulator Capabilities
  • Lint and the Support Annotations
  • Inspecting Layouts
  • Screenshots and Screencasts
  • ADB Tips and Tricks
  • Stetho
  • Issues with Speed
  • Finding CPU Bottlenecks
  • Focus On: NDK
  • Improving CPU Performance in Java
  • Finding and Eliminating Jank
  • Issues with Bandwidth
  • Focus On: TrafficStats
  • Measuring Bandwidth Consumption
  • Being Smarter About Bandwidth
  • Issues with Application Heap
  • Finding Memory Leaks
  • Issues with System RAM
  • Issues with Battery Life
  • Power Measurement Options
  • Sources of Power Drain
  • Addressing Application Size Issues
  • Crash Reporting Using ACRA
  • In-App Diagnostics
  • Anti-Patterns
  • Widget Catalog: AdapterViewFlipper
  • Widget Catalog: CalendarView
  • Widget Catalog: DatePicker
  • Widget Catalog: ExpandableListView
  • Widget Catalog: SeekBar
  • Widget Catalog: SlidingPaneLayout
  • Widget Catalog: StackView
  • Widget Catalog: TabHost and TabWidget
  • Widget Catalog: TimePicker
  • Widget Catalog: ViewFlipper
  • Device Catalog: Chrome and Chrome OS
  • Device Catalog: BlackBerry
  • Device Catalog: Android TV
  • Device Catalog: Amazon Fire TV and Fire TV Stick
  • Device Catalog: Samsung DeX
  • Appendix A: CWAC Libraries
  • Appendix B: Android 8.0
  • Appendix C: Android 9.0
  • Appendix D: Community Theater and the Appinars