掌握多核Android异步编程:第二版

需积分: 10 59 下载量 26 浏览量 更新于2024-07-20 收藏 2.49MB PDF 举报
《异步Android编程第二版》是一本专为希望学习如何利用Android高级异步技术和概念构建多线程、可靠Android应用的开发者编写的指南。该书针对Android开发人员,强调在当今多核移动设备上通过异步编程实现应用程序的可扩展性和性能优化。书中涵盖了丰富的主题,包括: 1. **Android进程模型与并发框架**:首先介绍Android的进程模型,以及Android SDK提供的低级别并发和多线程构造,这对于理解应用程序在不同运行环境中的行为至关重要。 2. **AsyncTask的使用**:通过实例演示如何使用AsyncTask在后台加载数据,并同时提供进度反馈,提高用户体验。 3. **服务的背景执行**:讲解IntentService、绑定服务和外部服务的创建,这些服务可以在用户不交互时持续运行,从而提升应用程序的响应性和后台处理能力。 4. **任务调度与电池优化**:探讨如何通过AlarmManager和JobSchedulerAPI合理安排工作,避免过度消耗电池并保持良好的用户体验。 5. **JNI与本地代码执行**:指导读者在Android NDK的帮助下执行CPU密集型任务,实现更高效的计算。 6. **网络通信**:介绍了使用HTTP协议和Google GCM平台进行异步远程服务交互的方法,以及利用这些平台进行数据推送和接收。 7. **RxJava的应用**:深入浅出地介绍RxJava,这是一种流行的用于简洁、响应式编程的异步Java框架,用于执行复杂任务并保证可预测性。 8. **Loader的使用**:教授如何使用Android Loader机制来获取最新的数据结果,确保UI的及时更新。 整本书内容详实,适合希望通过最新异步技术提升Android应用程序性能和响应性的开发者,无论是在处理日常任务还是开发高级特性时都能提供实用的指导。同时,版权信息表明所有内容未经许可不得复制或传播,且出版商对信息的准确性尽力保障,但不承担因使用本书引发的任何责任。
2016-08-28 上传
"Asynchronous Android Programming" English | ISBN: 1785883240 | 2016 | 394 pages About This Book Construct scalable and performant applications to take advantage of multi-thread asynchronous techniques Explore the high-level Android asynchronous constructs available on the Android SDK Choose the most appropriate asynchronous technique to implement your next outstanding feature Who This Book Is For This book is for Android developers who want to learn how to build multithreaded and reliable Android applications using high-level and advanced asynchronous techniques and concepts. What You Will Learn Get familiar with the Android process model and low-level concurrent and multithread constructs available on the Android SDK Use AsyncTask to load data in the background, delivering progress results in the meantime Enhance UI performance and responsiveness by sending work to a service running in the background Defer, schedule, and batch work on the Android system without compromising the battery life and user experience Use the JNI interface to execute concurrent work on native layer Pull and push data from your network servers using the Google GCM platform Create and compose tasks with RxJava to execute complex asynchronous work in a predictable way Get accustomed to the use of the Android Loader construct to deliver up-to-date results In Detail Asynchronous programming has acquired immense importance in Android programming, especially when we want to make use of the number of independent processing units (cores) available on the most recent Android devices. To start with, we will discuss the details of the Android process model and the Java low-level concurrent framework, delivered by the Android SDK. Next, we will discuss the creation of IntentServices, bound services, and external services, which can run in the background even when the user is not interacting with them. In a more advanced phase, you will create background tasks that are able to execute CPU-intensive tasks in native code–making use of the Android NDK. You will be then guided through the process of interacting with remote services asynchronously using the HTTP protocol or Google GCM Platform. Finally, we will introduce RxJava, a popular asynchronous Java framework used to compose work in a concise and reactive way.
2016-08-29 上传
Asynchronous programming has acquired immense importance in Android programming, especially when we want to make use of the number of independent processing units (cores) available on the most recent Android devices. To start with, we will discuss the details of the Android process model and the Java low-level concurrent framework, delivered by the Android SDK. Next, we will discuss the creation of IntentServices, bound services, and external services, which can run in the background even when the user is not interacting with them. In a more advanced phase, you will create background tasks that are able to execute CPU-intensive tasks in native code–making use of the Android NDK. You will be then guided through the process of interacting with remote services asynchronously using the HTTP protocol or Google GCM Platform. Finally, we will introduce RxJava, a popular asynchronous Java framework used to compose work in a concise and reactive way. What You Will Learn Get familiar with the Android process model and low-level concurrent and multithread constructs available on the Android SDK Use AsyncTask to load data in the background, delivering progress results in the meantime Enhance UI performance and responsiveness by sending work to a service running in the background Defer, schedule, and batch work on the Android system without compromising the battery life and user experience Use the JNI interface to execute concurrent work on native layer Pull and push data from your network servers using the Google GCM platform Create and compose tasks with RxJava to execute complex asynchronous work in a predictable way Get accustomed to the use of the Android Loader construct to deliver up-to-date results