Efficient Android Threading: Asynchronous Processing Techniques for Android Applications (Paperback)

Anders Goransson

買這商品的人也買了...

商品描述

Multithreading is essential if you want to create an Android app with a great user experience, but how do you know which techniques can help solve your problem? This practical book describes many asynchronous mechanisms available in the Android SDK, and provides guidelines for selecting the ones most appropriate for the app you’re building.

Author Anders Goransson demonstrates the advantages and disadvantages of each technique, with sample code and detailed explanations for using it efficiently. The first part of the book describes the building blocks of asynchronous processing, and the second part covers Android libraries and constructs for developing fast, responsive, and well-structured apps.

  • Understand multithreading basics in Java and on the Android platform
  • Learn how threads communicate within and between processes
  • Use strategies to reduce the risk of memory leaks
  • Manage the lifecycle of a basic thread
  • Run tasks sequentially in the background with HandlerThread
  • Use Java’s Executor Framework to control or cancel threads
  • Handle background task execution with AsyncTask and IntentService
  • Access content providers with AsyncQueryHandler
  • Use loaders to update the UI with new data

商品描述(中文翻譯)

多線程是創建具有良好用戶體驗的Android應用程序所必需的,但是您如何知道哪些技術可以幫助解決您的問題呢?這本實用書籍描述了Android SDK中提供的許多異步機制,並提供了選擇最適合您正在構建的應用程序的指南。

作者Anders Goransson演示了每種技術的優點和缺點,並提供了使用它們的示例代碼和詳細解釋。本書的第一部分描述了異步處理的基本組件,第二部分涵蓋了用於開發快速、響應和結構良好的應用程序的Android庫和結構。

- 瞭解Java和Android平台上的多線程基礎知識
- 學習線程在進程內部和進程之間的通信方式
- 使用策略減少內存泄漏的風險
- 管理基本線程的生命周期
- 使用HandlerThread在後台按順序運行任務
- 使用Java的Executor Framework來控制或取消線程
- 使用AsyncTask和IntentService處理後台任務執行
- 使用AsyncQueryHandler訪問內容提供者
- 使用loader更新UI的新數據