Summary

In this chapter, we explored

  • How the main thread coordinates between various components of an Android process.
  • How handlers and threads can be used to extend the reach of a main thread, as well as how a main thread must return in five seconds to avoid ANR messages. This rule applies to broadcast receivers as well, except that the limit for a broadcast receiver is ten seconds.
  • How component life cycles impact both main threads and subthreads.

Get Pro Android 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.