万本电子书0元读

万本电子书0元读

顶部广告

Asynchronous Android电子书

售       价:¥

20人正在读 | 1人评论 9.8

作       者:Steve Liles

出  版  社:Packt Publishing

出版时间:2013-12-24

字       数:69.9万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(1条)
  • 读书简介
  • 目录
  • 累计评论(1条)
Concurrent Programming on Android is a step-by-step guide that builds a complete picture of the concurrency constructs available on the Android platform.This book is for Android developers who want to learn about the advanced concepts of Android programming. No prior knowledge of concurrency and asynchronous programming is required. This book is also targeted towards Java experts who are new to Android.
目录展开

Asynchronous Android

Table of Contents

Asynchronous Android

Credits

About the Author

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers and more

Why Subscribe?

Free Access for Packt account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

1. Building Responsive Android Applications

Introducing the Dalvik Virtual Machine

Memory sharing and the Zygote

Understanding the Android thread model

The main thread

Unresponsive apps and the ANR dialog

Maintaining responsiveness

Concurrency in Android

Correctness issues in concurrent programs

Liveness issues in concurrent programs

Android-specific concurrency issues

The Activity lifecycle

Manipulating the user interface

Android-specific concurrency constructs

Summary

2. Staying Responsive with AsyncTask

Introducing AsyncTask

Declaring AsyncTask types

Executing AsyncTasks

Providing feedback to the user

Providing progress updates

Canceling AsyncTask

Handling exceptions

Controlling the level of concurrency

Common AsyncTask issues

Fragmentation issues

Activity lifecycle issues

Handling lifecycle issues with early cancellation

Handling lifecycle issues with retained headless fragments

Applications of AsyncTask

Summary

3. Distributing Work with Handler and HandlerThread

Understanding Looper

Building responsive apps with Handler

Scheduling work with post

Canceling a pending Runnable

Scheduling work with send

Canceling pending Messages

Composition versus Inheritance

Multithreaded example

Sending Messages versus posting Runnables

Building responsive apps with HandlerThread

Handler programming issues

Leaking implicit references

Leaking explicit references

Applications of Handler and HandlerThread

Summary

4. Asynchronous I/O with Loader

Introducing Loaders

Building responsive apps with AsyncTaskLoader

Building responsive apps with CursorLoader

Combining Loaders

Applications of Loaders

Summary

5. Queuing Work with IntentService

Introducing Service and IntentService

Building responsive apps with IntentService

Handling results

Returning results with PendingIntent

Posting results as system notifications

Applications of IntentService

HTTP uploads with IntentService

Reporting progress

Summary

6. Long-running Tasks with Service

Building responsive apps with Service

Controlling concurrency with Executors

Returning results with Messenger

Communicating with Services

Direct communication with local Services

Broadcasting results with Intents

Detecting unhandled broadcasts

Applications of Services

Summary

7. Scheduling Work with AlarmManager

Scheduling alarms with AlarmManager

Canceling alarms

Scheduling repeating alarms

Handling alarms

Handling alarms with Activities

Handling alarms with BroadcastReceiver

Doing work with BroadcastReceiver

Doing background work with goAsync

Handling alarms with Services

Staying awake with WakeLocks

Applications of AlarmManager

Summary

Index

累计评论(1条) 2个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部