Welcome to the third edition of Android Recipes!
If you are reading this book, you probably don’t need to be told of the immense opportunity that
mobile devices represent for software developers and users. In recent years, Android has become
one of the top mobile platforms for device users. This means that you, as a developer, must know
how to harness Android so you can stay connected to this market and the potential that it offers. But
any new platform brings with it uncertainty about best practices and solutions to common needs and
What we aim to do with Android Recipes is give you the tools to write applications for the Android
platform through direct examples targeted at the specific problems you are trying to solve. This book
is not a deep dive into the Android SDK, NDK, or any of the other tools. We don’t weigh you down
with all the details and theory behind the curtain. That’s not to say that those details aren’t interesting
or important. You should take the time to learn them, as they may save you from making future
mistakes. However, more often than not, they are simply a distraction when you are just looking for a
solution to an immediate problem.
This book is not meant to teach you Java programming or even the building blocks of an Android
application. You won’t find many basic recipes in this book (such as how to display text with
TextView, for instance), as we feel these are tasks easily remembered once learned. Instead, we set
out to address tasks that developers, once comfortable with Android, need to do often but find too
complex to accomplish with a few lines of code.
Treat Android Recipes as a reference to consult, a resource-filled cookbook that you can always
open to find the pragmatic advice you need to get the job done quickly and well.