Logo Icon Logo
A Crowd-sourced Cookbook on Writing Great Android® Apps
GitHub logo Twitter logo OReilly Book Cover Art
The Java Cookbook

Note: This is the alpha version of the "new" site software. The original version is still online at https://androidcookbook.com

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

Top Contributors
Total Members 822
Android News
Best Kickstarters of the month – June 2016You will spend hours searching Kickstarter for the best crowdfunding projects, but which are the best? Here's our top Kickstarter picks for June 2016! Read more...
Verizon wants to buy your old phone off you for up to $300Still got an ancient device still clinging to memories of its 2014 glory days? Verizon has your back to the tune of three hundred bucks. Read more...
Deal: Samsung Galaxy S7 (on-contract) for just $49, with free wireless charging pad If you're a Sprint or Verizon customer that is looking for a new on-contract phone, Best Buy has your back with its new 4th of July sale that sees the Galaxy S7 for just $50 with two-year agreement.  Read more...
CSR Racing 2 out now: drag racing, beautiful graphics, and attention to detailOut now on Android, CSR Racing 2 brings graphics that approach console quality, a slew of customization options, and entire garages of faithfully reproduced licensed vehicles. Read more...
Which smartphones retain their resale value the best?If you're looking to keen to swap your flagship smartphone for a new one this year, here's a list of the handsets with the best resale value. Read more...
Site News...
Book Revision Starts In Earnest On 2016-02-29, Ian said:We are now starting the Second Edition of the printed book, which will reflect the many changes in Android since the first edition and incorporate many new recipes, update many, and a few older ones will be removed from the printed book (but still remain online here, with a note that they refer to deprecated APIs).
6.0 Marshmallow SDK 23 final, release in fall On 2015-08-18, Ian said:The next main release will be 6.0, Marshmallow, API level 23, and will be out sometime this fall. Preview releases for modern Nexus devices are available now, as are the SDKs and preview images. Get s'moring! Read more...
Now that's a PHONE! On 2015-06-16, Ian said:The Saygus V will have up to 464GB of storage (64GB base + 2 x 200 u-SD). Whew! Scope this out if you like real hardware! Read more...
Move to new server On 2015-05-27, Ian said:If you can see this news item, you are on the new site! We are now running on the new machine, but still running the old software. All access should be via SSL; you should always see the green padlock in the browser text field. If you find any difficulties with the new site please use the Contact form (in the Community menu) to let us know.