Logo Icon Logo
A Crowd-sourced Cookbook on Writing Great Android® Apps
GitHub logo Twitter logo OReilly Book Cover Art
HomeF.A.Q.
Community
Writing Recipes
Login
Welcome to the Crowd-Sourced Android CookBook
Chapter View
0 Preface1 Getting Started2 Designing a successful Application
3 Testing4 Inter/Intra-Application Communication5 Content Providers
6 Graphics7 Graphical User Interface8 GUI Alerts: Menus, Dialogs, Toasts and Notifications
9 GUI: ListView10 Multimedia11 Data Persistence
12 Telephone Applications13 Networked Applications14 Gaming and Animation
15 Social Networking16 Location and Map Applications17 Accelerometer and other Sensors
18 Bluetooth19 System and Device Control20 Other Programming Languages
21 Strings and Internationalization22 Packaging, deploying and selling23 Other (temporary holder)

New: Order the book/ebook at O'Reilly, Chapters-Indigo, Barnes and Noble, or Amazon.

We are building a community-written web site which has also been used to create an O'Reilly Cookbook, both about how to build great Android applications. It is full of how-to information along with code snippets that illustrate the ideas presented. It features both how-to's that overlap with the official documentation, and material that goes beyond this to be more tutorial, more in-depth, or explaining "lessons from the trenches": what actually works to get the application functioning well. Unlike most books written by one, two or a few individuals, this one has input from dozens of contributors, who were all able to view and comment on each others' recipes before the book was published. The published version(s) include printed books, eBooks, and other uses. And long after the book was first published in 2012, this site will continue to exist - with a larger collection of recipes than will fit in the published book - and serve as an Android developer resource site long after.

We welcome contributions from anybody who has something useful to say about how to make usable and successful Android applications. There are several ways of contributing: experienced Android developers can write recipes; newer ones can suggest recipes that they'd like to see; anybody can read and comment on recipes; anybody can vote for existing recipes (voting indicates that you like the recipe and/or think it should be included in the published edition of the book). All we ask of contributors is the following:

  • You agree to license your work - both the textual description and the code fragment(s) - under the Creative Commons Attribution cc-by License;
  • When writing a new recipe, you put your contribution into the standard Cookbook form ("Problem", "Solution", "Discussion") as described on the Add New Recipe form;
  • Only paste in code fragments that have been compiled and run;
  • And of course you assert that the work is your own. Do not copy from others' books or published works; if we wanted to reprint existing stuff we could just find it on the web. And if you are working for an organization, you assert that you have permission to use portions of their code.

Of course, everyone who contributes a Recipe gets credit for it on the site. In addition, everyone who contributed one or more Recipes that are chosen - at the editors' discretion - for inclusion in the published work, received an ebook copy of the finished edition (readable in all supported O'Reilly eBook formats).

Find more about the book - read the Preface

Get the Code

List of all Recipes

Ideas on recipes to write

Get started contributing

Thank you!

Ian Darwin,
Site Editor

In The News
  • Android "L" 5.0 Lollipop is here; new devices with new prices On 2014-11-07, Ian wrote:

    The Nexus 6 and Nexus 9 tablet are the first devices slated to ship with Lollipop pre-installed. Sweet it will be to get our hands on these "hot off the press", though the inventory issues are making the Nexus 6 arrival a bit more bitter.

  • Git Repository Changes Ownership On 2014-01-29, Ian wrote:

    I had created a separate GitHub.com account just for this repository, and it became a nuisance having to keep track of the multiple accounts, so I've changed the ownership of the repository to my "real" account, IanDarwin. So IF you are maintaining your own copy of the repo, you probably want to do something like the following.

    $ git remote remove origin

    $ git remote add origin git@github.com:IanDarwin/Android-Cookbook-Examples.git

    $ git branch --set-upstream master origin/master

    $ git pull

  • Android KitKat 4.4 Arrives On 2013-10-31, Ian wrote:

    Google today announced the release of Android 4.4 "KitKat" and "just in time for Hallowe'en": new features, new devices, and inevitably, dropping of support for older devices like my Galaxy Nexus. Obviously CyanogenMod et al will support these devices, there is no technical reason for dropping it. Is it only to "encourage" people to buy the new Nexus 5 at $350?

  • New Recipes Still Wanted On 2013-07-10, Ian wrote:

    If you watch the site you'll notice that we still are getting new recipes, though I am contributing most of them. Exisiting and new contributors (this means you, new members!) are welcome and encouraged to write and submit original new recipes on how to make great Android apps. If you have material that you already published elsewhere and want to convert to recipe format and post here that's also appreciated, as long as (a) it's your own original material and (b) you have the right to republish it. Thanks!

  • O'Reilly celebrates Day Against DRM - 50% off all ebooks http://bit.ly/165DgUh On 2013-05-03, Ian wrote:

    O'Reilly celebrates Day Against DRM - Save 50% on all ebooks including #AndroidCookBook http://bit.ly/165DgUh

    Today Only - May 3rd.

    If you didn't yet pick up a copy of the Android Cookbook, now's your chance, at half off. And, at the same time, you can get the same 50% off any O'Reilly eBooks and any O'Reilly videos! http://bit.ly/165DgUh

    Of course, all O'Reilly eBooks are DRM free!

    Ian

  • Minor Revision On 2013-02-12, Ian wrote:

    I got the chance to do a bunch of typo and wording corrections based on feedback and my own re-reading of some chapters, and managed to cram in a couple more recipes (and remove one that was accidentally a near-duplicate). If you are a contributor, or if you purchased the eBook, the revised eBook should now available be at no charge in your O'Reilly.com "My Account -> My Products" page. As for printed books, since they only print in small batches, bookstore copies should be up-to-date fairly soon.

When used to describe a portable operating environment for computing devices, Android is a trademark of Google Inc. Use of this trademark is subject to Google Permissions. Java is a trademark of Sun Microsystems Oracle America Inc.