The Busy Coder's Guide to Android Development


Do you want comprehensive information about how to develop Android apps? This book contains over 200 chapters, covering everything from the first steps in getting an app going to advanced development techniques. Use the search field in the nav bar to see what is inside this book and the rest of the CommonsWare library!

This book is published in PDF, EPUB, and MOBI/Kindle formats, for use in your favorite digital book reader. Or, read directly in your Web browser on the Warescription site, complete with full-text searching.

Subscribe for $20 »

The Book's Structure

The book is divided into core chapters plus the trails.

The core chapters — representing ~800 pages — are set up as a typical programming guide, covering the basics of getting an Android app up and running. The book includes material on setting up your development tools, constructing a user interface, loading data from a local database or the Internet, handling the differences between phones and tablets, and much more.

The core chapters also include an integrated set of 17 tutorials, offering you step-by-step guides for creating an Android application from scratch. Hence, whether you "learn by reading" or "learn by doing", you have the material in the core chapters to accomplish your goal.

The rest of the book comprises the trails. These are linked sets of chapters covering advanced topics, organized by theme. However, while the core chapters are designed to be read in sequence, the trails are designed to be read on an as-needed basis, when you want to dive into those specific topics.

As the book is distributed in digital form, the chapters are heavily hyperlinked, both to other chapters and to Internet resources like the source code to the book's hundreds of sample apps.

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
profile for CommonsWare at Stack Overflow, Q&A for professional and enthusiast programmers

Details

Spread the Word!