6 Threads, Handlers, and Programmatic Movement

Chapter Objectives

In this chapter you will:

  Understand the benefits of multithreading on Android.

  Understand multithreading fundamentals.

  Know the Thread class and the Runnable interface.

  Understand an AsyncTask.

  Learn to implement canvas movement using surface views.

  Learn to communicate between threads.

  6.1 Multithreading and Multicore Processing

Since the early days of Cupcake, Android-powered devices have grown enormously in multitasking capability. Even fairly recent mobile devices have more resource constraints (such as CPU, memory, and battery power) than a desktop computer; this makes multitasking more difficult on a mobile device. Nevertheless, Android users have ...

Get Android Programming Concepts now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.