O'Reilly logo

Java™ 7: A Comprehensive Tutorial by Budi Kurniawan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 35

More Android Applications

In Chapter 34, “Creating Android Applications” you learned to write several Android applications. In this chapter you learn more topics and write more advanced applications. Three applications—HandlerTest, SoundMeter, and PhotoEditor—are discussed in this chapter.

Handling the Handler

The android.os.Handler class is an exciting utility class that, among others, can be scheduled do execute a Runnable at a future time. Any task assigned to a Handler will run on the Handler’s thread. In turn, the Handler runs on the thread that created it, which in most cases would be the UI thread. As such, you should not schedule a long-running task with a Handler because it would make your application freeze. However, you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required