Android Concurrency
©2016 |Addison-Wesley Professional | Available
G. Blake Meike
©2016 |Addison-Wesley Professional | Available
K-12 educators: This link is for individuals purchasing with credit cards or PayPal only. Contact your Savvas Learning Company Account General Manager for purchase options.
This product is part of the following series. Click on a series title to see the full list of products in the series.
Preface xiii
Chapter 1 Understanding Concurrency 1
Concurrency Made Hard 1
Concurrency in Software 2
Concurrency in Hardware 3
Concurrency Made Simple 4
Threads 4
Atomic Execution 5
Visibility 6
Summary 7
Chapter 2 Java Concurrency 9
Java Threads 9
The Thread Class 10
Runnables 11
Synchronization 11
Mutexes 12
Common Synchronization Errors 15
Volatile 17
Wait and Notify 20
Wait 20
Notify 22
The Concurrency Package 23
Safe Publication 23
Executors 25
Futures 26
Summary 27
Chapter 3 The Android Application Model 29
Lifecycles and Components 29
Process Priority 31
Component Lifecycles 33
Android Applications as Web Apps 35
The Android Process 36
Application Startup 36
The Android Main Thread 38
Summary 40
Chapter 4 Async Tasks and Loaders 41
Async Task Architecture 41
Async Task Basics 45
AsyncTask Execution 48
AsyncTask Completion 50
Using AsyncTasks 52
AsyncTask: Considered Dangerous 52
Getting It Right 58
Loaders and Cursor Loaders 59
AsyncTasks: What Went Wrong 67
Summary 68
Chapter 5 Looper/Handler 69
Introducing the Looper/Handler 69
Basic Looper/Handler 71
Delegating Execution 73
Some Gory Details 81
Handlers and Messages 81
Starting a Looper 84
The Native Looper 86
Scheduling and the Sync-Barrier 87
Summary 88
Chapter 6 Services, Processes, and Binder IPC 91
Service Basics 92
Started Service Essentials 93
Bound Service Essentials 95
Intents 96
The Intent Service 99
Bound Services 103
A Simple Bound Service 103
Binding A Service 105
Unbinding A Service 106
Binding Multiple Services 107
Service Lifecycle 109
Priorities and Flags 111
A Local Bound Service 112
Inter-Process Communication 114
Parcelables 116
Messengers 116
Using AIDL 120
Creating Processes 123
Binder, Considered Briefly 125
Binder Threads 125
Binder Data Transfer Limits 126
Binding to Death 126
Summary 126
Chapter 7 Periodic Tasks 127
Task Characteristics 127
Thread Safety 128
Lifecycle-Aware 128
Smart Use of Process Priority 128
Power-Thrifty 129
The Scorecard 130
Timer and TimerTask 130
Looper/Handler 130
Custom Service-based Scheduler 133
Alarm Manager and Intent Service 134
The Alarm Manager Service 135
Schedulable Tasks 139
Sync-Adapters 142
Defining a Sync-adapter 143
How Sync-adapters Work 145
Implementing the Sync-adapter 147
Scoring the Sync-adapter 152
The JobScheduler 155
Scheduling a Task 156
Running a Task 159
Task Implementation 161
Scoring the JobScheduler 165
Summary 166
Chapter 8 Concurrency Tools 167
Static Analysis 167
Android Studio 168
Findbugs 169
Annotations 177
JCIR Annotations 177
Support Library Annotations 178
Assertions 179
Conclusion and Best Practices 180
Bibliography 183
Index 185
Pearson offers affordable and accessible purchase options to meet the needs of your students. Connect with us to learn more.
K12 Educators: Contact your Savvas Learning Company Account General Manager for purchase options. Instant Access ISBNs are for individuals purchasing with credit cards or PayPal.
Savvas Learning Company is a trademark of Savvas Learning Company LLC.
Meike
©2016  | Addison-Wesley Professional
Format | ePub | |
ISBN-13: | 9780134177601 | |
Online purchase price | $31.99 | Students, buy or rent this eText |
Availability |
Live
|
Meike
©2016  | Addison-Wesley Professional  | 224 pp
Blake Meike is a passionate engineer, architect, and code poet. As an author, speaker, and instructor, he has taught thousands of people how to write Android apps that aren’t toys. He has more than 20 years of coding experience, most of it with Java, building systems as large as Amazon’s massively scalable AutoScaling service and as small as a pre-Android OSS Linux/ Java-based platform for cell phones. He is co-author of several other books, including O’Reilly’s bestselling Programming Android and Wiley's Enterprise Android. Blake holds a degree in Mathematics and Computer Science from Dartmouth College and was a founding member of Twitter University. He lives in Oakland, CA, and works for Cyanogen Inc.
We're sorry! We don't recognize your username or password. Please try again.
The work is protected by local and international copyright laws and is provided solely for the use of instructors in teaching their courses and assessing student learning.
You have successfully signed out and will be required to sign back in should you need to download more resources.