Errata for Android Programming Tutorials
A quick reminder: if you see problems in the book that are not listed here, report them via the Book Bug Bounty program!
PUBLISHED VERSIONS PRIOR TO VERSION 2.1: The Patchy example, dominating the second half of the book, uses Twitter as a data provider, but uses the older "basic authentication" model. That is being turned off by Twitter now. As such, Patchy will compile but will soon fail to run. Learn how to get your samples working despite this problem here.
Version 2.8 - June 2010
- On page 98, the sample code refers to
RestaurantSQLiteHelper, which should beRestaurantHelper.
Version 2.1 - June 2010
- In Tutorial #16, the first link to the identi.ca-compatible JTwitter JAR is incorrect — you can download it from here.
- The source code sample on page 174 for the
updateStatus()method is missing a line. After creating theTwitterobject, you need to callclient.setAPIRootUrl("https://identi.ca/api");. This statement appears later in the chapter, but it should appear here as well.
2nd Print Edition / Version 2.0 - February 2010
- On page 352, the caption to Figure 60 is the same as the caption for Figure 59. The caption to Figure 60 should be: "The very boring LunchList widget".
Version 1.9 - January 2010
- On page 40, the sample code shows the use of
R.id.name, which in this case should beR.id.title
Version 1.1 - November 2009
- Page 16, underneath Figure 7, has "Use the directional pad (D-pad) below the [MENU] button", which should now be "Use the directional pad (D-pad) above the [MENU] button".
- Pages 38-39 show the XML for the layout for a row in the LunchList tutorial. That row has a widget (
@+id/name) that duplicates the name in the layout for the overall activity. This is bad form and can lead to bugs. This problem gets resolved in the next tutorial, as the two same-named widgets will be contained in separate tabs and so will not conflict with each other. Future editions of this book will give these two widgets separate names. - Page 67 has
R.id.titlewhere it should haveR.id.name.
Version 1.0 - June 2009
- On page xix, the link to the knol is incorrect. Click here to visit the knol in question. You may also be interested in the AndMob wiki.
- Pages 40-41 show the XML for the layout for a row in the LunchList tutorial. That row has a widget (
@+id/name) that duplicates the name in the layout for the overall activity. This is bad form and can lead to bugs. This problem gets resolved in the next tutorial, as the two same-named widgets will be contained in separate tabs and so will not conflict with each other. Future editions of this book will give these two widgets separate names. - Page 40 mentions "three icons" that you will need to set up for your layouts. However, it fails to mention that
these need to be named
ball_red.png,ball_yellow.png, andball_green.png, all located inres/drawable/in your project. Note that the file types could be different (e.g., JPEG instead of PNG), but the base names (e.g.,ball_red) are important. - Page 98 should include a code listing for the new
populateFrom()method onRestaurantWrapper. You can find this code on page 105-106. - Page 98 also shows
newView()populating the row. That is not necessary —bindView()will be called afternewView()on the row returned bynewView(). Hence, allnewView()needs to do is inflate the row. - On page 148, the name of the
onRetainNonConfigurationInstance()method is missing the "Non" part.
Version 0.9 - April 2009
- On page 191, the tutorial indicates that the local service is a singleton, "accessible from a static method on the service class". Actually, it is only a public static data member on the service class.