Efficient Android Threading: Asynchronous Processing Techniques for Android Applications (Paperback)
暫譯: 高效的 Android 執行緒:Android 應用程式的非同步處理技術 (平裝本)

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 來控制或取消執行緒
- 使用 AsyncTaskIntentService 處理背景任務執行
- 使用 AsyncQueryHandler 訪問內容提供者
- 使用加載器更新 UI 以顯示新數據