Getting Help

Obviously, this book does not cover everything. And while your #1 resource (besides the book) is going to be the Android SDK documentation, you are likely to need information beyond what’s covered in either of those places.

Searching online for “android” and a class name is a good way to turn up tutorials that reference a given Android class. However, be sure to check the age of the blog post or whatever that you are reading. The older it is, the more likely that it is out of date, based upon changes in Android or just better solutions that have evolved over time.

Beyond randomly hunting around for tutorials, though, this chapter outlines some other resources to keep in mind.

Questions. Sometimes, With Answers.

Stack Overflow’s android tag is the world’s #1 place to get Android help. However, there are a variety of other sites offering help in a variety of languages.

It is important, particularly for Stack Overflow, to write well-written questions:

  1. Include relevant portions of the source code (e.g., the method in which you are getting an exception) and the stack trace from Logcat, if the problem is an unhandled exception.
  2. On Stack Overflow, make sure your source code and stack trace are formatted as source code; on Google Groups, consider posting long listings on gist.github.com or a similar sort of code-paste site.
  3. Explain thoroughly what you are trying to do, how you are trying to do it, and why you are doing it this way (if you think your goal or approach may be a little offbeat).
  4. On Stack Overflow, respond to answers and comments with your own comments, addressing the person using the @ syntax (e.g., @CommonsWare), to maximize the odds you will get a reply. However, only use that for people who are already involved in your question.
  5. On the Google Groups, do not “ping” or reply to your own message to try to elicit a response until a reasonable amount of time has gone by (e.g., 24 hours).

Heading to the Source

The source code to Android is now available. Mostly this is for people looking to enhance, improve, or otherwise fuss with the insides of the Android operating system. But, it is possible that you will find the answers you seek in that code, particularly if you want to see how some built-in Android component “does its thing”.

The source code and related resources can be found at http://source.android.com. Here, you can:

  1. Download the source code
  2. File bug reports against the operating system itself
  3. Submit patches and learn about the process for how such patches get evaluated and approved
  4. Join a separate set of Google Groups for Android platform development