O'Reilly logo

Android™ Wireless Application Development Volume II: Advanced Topics, Third Edition by Shane Conder, Lauren Darcey

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

1. Threading and Asynchronous Processing

Offloading intensive operations provides a smoother, more stable experience to the user. The Android SDK provides two easy ways to manage offload processing from the main UI thread: the AsyncTask class and the standard Java Thread class. An Activity or Fragment often needs to load data upon launch, which can be done asynchronously using a Loader class. In this chapter, you learn how to make your applications more responsive by knowing when and how to move intensive operations off the main UI thread to be handled asynchronously.

The Importance of Processing Asynchronously

Users demand responsive applications, time-intensive operations such as networking should not block the main UI thread. Some common blocking ...

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