Write Apps for Maximum Performance and Responsiveness
โThreading and concurrency are as important in mobile as they are in large, distributed systems. This book does an excellent job of re-introducing us to the basic concepts and describing how to apply them to the Android framework. Even the most experienced Android developer should pick up at least a few tricks from these pages.โ
โDave Smith, PE, Google Developer Expert for Android
Mastering concurrency is critical to developing software with superior performance and responsiveness. This is especially true for Android, where interruptions are frequent and abrupt, and in order to be correct, programs must be aware of component and process lifecycles in addition to being thread safe.
You need a deep, Android-specific understanding of concurrencyโand Android Concurrency delivers it. This guide in Addison-Wesleyโs Android Deep Dive series for experienced Android developers helps you leverage todayโs multi-core processors and heavily cached architectures, as well as major improvements built into Android 5 (Lollipop).
Top Android developer and consultant Blake Meike strips the magic and mystery from concurrent programming and presents intensely practical solutions for everything from inter-thread communication to network communication. Meike introduces a simple but powerful architectural framework you can use to address new issues whenever they arise, and offers expert guidance for debugging even highly complex concurrency issues.
Android Concurrency combines in-depth knowledge, proven patterns and idioms, and world-class insights for avoiding performance-killing mistakes. For serious Android developers, it will be an indispensable resource.
You will
โข Gain new clarity about what concurrency really is, and how concurrent processes work
โข Master best practices for writing concurrent code thatโs more robust and less susceptible to weird, hard-to-diagnose errors
โข Review the Java concurrency mechanisms Androidโs constructs are built upon
โข Shape an approach to concurrency that reflects the unique characteristics of the Android environment
โข Avoid widespread misconceptions that lead Android developers into trouble
โข Make the most of AsyncTaskโbut only when itโs the right tool for the job
โข Leverage the powerful, lightweight Looper/Handler framework to support scheduled, asynchronous tasks and execute many message types
โข Use the Android Service component to separate business logic from UI
โข Understand the differences between started and bound services and use them effectively for intra- and inter-process communication
โข Perform scheduled tasks, including tasks requiring polling and explicit scheduling
โข Track down problems via static analysis, annotations, and assertions