About the Author |
|
xvii | |
About the Technical Reviewer |
|
xix | |
Preface |
|
xxi | |
Introduction |
|
xxiii | |
|
|
1 | (6) |
|
The Android Operating System |
|
|
1 | (2) |
|
|
3 | (4) |
|
|
3 | (1) |
|
|
4 | (2) |
|
|
6 | (1) |
|
|
7 | (6) |
|
|
9 | (1) |
|
|
10 | (3) |
|
|
13 | (18) |
|
|
14 | (2) |
|
|
16 | (1) |
|
|
17 | (1) |
|
Activities Returning Data |
|
|
18 | (2) |
|
|
20 | (5) |
|
|
21 | (1) |
|
|
21 | (1) |
|
|
22 | (1) |
|
|
23 | (1) |
|
|
23 | (1) |
|
|
24 | (1) |
|
|
25 | (3) |
|
Preserving State in Activities |
|
|
28 | (3) |
|
|
31 | (20) |
|
|
32 | (1) |
|
|
33 | (1) |
|
|
33 | (4) |
|
|
37 | (1) |
|
|
38 | (1) |
|
|
39 | (5) |
|
|
44 | (3) |
|
|
47 | (1) |
|
|
48 | (1) |
|
More Service Characteristics |
|
|
49 | (2) |
|
|
51 | (20) |
|
|
51 | (5) |
|
Explicit Local Broadcasts |
|
|
52 | (2) |
|
Explicit Remote Broadcasts |
|
|
54 | (1) |
|
Explicit Broadcasts Sent to Other Apps |
|
|
55 | (1) |
|
|
56 | (9) |
|
|
57 | (3) |
|
Active or On-Hold Listening |
|
|
60 | (1) |
|
Sending Implicit Broadcasts |
|
|
61 | (1) |
|
Receiving Implicit Broadcasts |
|
|
62 | (1) |
|
Listening to System Broadcasts |
|
|
63 | (2) |
|
Adding Security to Broadcasts |
|
|
65 | (4) |
|
Securing Explicit Broadcasts |
|
|
65 | (2) |
|
Securing Implicit Broadcasts |
|
|
67 | (2) |
|
Sending Broadcasts from the Command Line |
|
|
69 | (1) |
|
Random Notes on Broadcasts |
|
|
70 | (1) |
|
Chapter 6 Content Providers |
|
|
71 | (56) |
|
The Content Provider Framework |
|
|
71 | (1) |
|
|
72 | (24) |
|
Initializing the Provider |
|
|
73 | (1) |
|
|
73 | (3) |
|
|
76 | (2) |
|
Finishing the ContentProvider Class |
|
|
78 | (1) |
|
Registering the Content Provider |
|
|
78 | (5) |
|
|
83 | (1) |
|
Building a Content Interface Contract |
|
|
84 | (3) |
|
A Cursor Class Basing on AbstractCursor and Co |
|
|
87 | (3) |
|
A Cursor Class Basing on the Cursor Interface |
|
|
90 | (1) |
|
Dispatching URIs Inside the Provider Code |
|
|
90 | (1) |
|
|
91 | (3) |
|
Informing Listeners of Data Changes |
|
|
94 | (1) |
|
Extending a Content Provider |
|
|
95 | (1) |
|
Client Access Consistency by URI Canonicalization |
|
|
96 | (1) |
|
|
96 | (18) |
|
Using the Content Resolver |
|
|
97 | (2) |
|
Accessing System Content Providers |
|
|
99 | (14) |
|
Batch-Accessing Content Data |
|
|
113 | (1) |
|
|
114 | (3) |
|
Providing Content for the Search Framework |
|
|
117 | (1) |
|
|
117 | (10) |
|
|
127 | (18) |
|
|
128 | (1) |
|
|
129 | (1) |
|
|
130 | (5) |
|
|
135 | (3) |
|
System-Managed Permission Requests |
|
|
138 | (2) |
|
Acquiring Special Permissions |
|
|
140 | (2) |
|
Feature Requirements and Permissions |
|
|
142 | (2) |
|
Permission Handling Using a Terminal |
|
|
144 | (1) |
|
|
145 | (112) |
|
|
145 | (18) |
|
Configuring Your Environment for Room |
|
|
146 | (1) |
|
|
146 | (1) |
|
|
147 | (1) |
|
|
147 | (2) |
|
|
149 | (2) |
|
|
151 | (1) |
|
|
152 | (1) |
|
|
153 | (3) |
|
|
156 | (3) |
|
|
159 | (2) |
|
|
161 | (1) |
|
|
161 | (2) |
|
|
163 | (10) |
|
|
165 | (4) |
|
|
169 | (4) |
|
|
173 | (16) |
|
Creating and Showing Notifications |
|
|
176 | (2) |
|
|
178 | (4) |
|
Notification Progress Bar |
|
|
182 | (1) |
|
|
183 | (1) |
|
Rectifying Activity Navigation |
|
|
183 | (1) |
|
|
184 | (2) |
|
|
186 | (2) |
|
|
188 | (1) |
|
|
189 | (22) |
|
Contacts Framework Internals |
|
|
189 | (1) |
|
|
190 | (11) |
|
|
201 | (6) |
|
Using Contacts System Activities |
|
|
207 | (1) |
|
Using Quick Contact Badges |
|
|
208 | (3) |
|
|
211 | (14) |
|
The Searchable Configuration |
|
|
211 | (1) |
|
|
212 | (1) |
|
|
213 | (2) |
|
|
215 | (2) |
|
|
217 | (8) |
|
|
225 | (13) |
|
|
226 | (3) |
|
Tracking Position Updates |
|
|
229 | (3) |
|
|
232 | (4) |
|
Using ADB to Fetch Location Information |
|
|
236 | (1) |
|
|
236 | (2) |
|
|
238 | (19) |
|
|
257 | (106) |
|
|
257 | (6) |
|
|
258 | (1) |
|
|
259 | (1) |
|
|
259 | (1) |
|
|
260 | (1) |
|
|
260 | (1) |
|
Loading Data in ViewModels |
|
|
261 | (2) |
|
Supporting Multiple Devices |
|
|
263 | (4) |
|
|
264 | (1) |
|
|
265 | (1) |
|
Declare Restricted Screen Support |
|
|
265 | (1) |
|
Detect Device Capabilities |
|
|
266 | (1) |
|
|
267 | (11) |
|
|
268 | (2) |
|
Using Jetpack Compose Builders |
|
|
270 | (8) |
|
Adapters and List Controls |
|
|
278 | (4) |
|
|
282 | (2) |
|
|
284 | (2) |
|
|
286 | (9) |
|
|
287 | (1) |
|
|
287 | (1) |
|
|
288 | (2) |
|
|
290 | (1) |
|
|
290 | (1) |
|
|
291 | (1) |
|
Start an Activity Using Transitions |
|
|
292 | (2) |
|
Animation in Jetpack Compose |
|
|
294 | (1) |
|
|
295 | (42) |
|
Showing an OpenGL Surface in Your Activity |
|
|
296 | (1) |
|
Creating a Custom OpenGL View Element |
|
|
297 | (2) |
|
A Triangle with a Vertex Buffer |
|
|
299 | (3) |
|
A Quad with a Vertex Buffer and an Index Buffer |
|
|
302 | (5) |
|
Creating and Using a Renderer |
|
|
307 | (2) |
|
|
309 | (14) |
|
|
323 | (1) |
|
|
324 | (3) |
|
|
327 | (8) |
|
|
335 | (2) |
|
Fast Graphics with Vulkan |
|
|
337 | (1) |
|
UI Design with Movable Items |
|
|
337 | (1) |
|
|
338 | (5) |
|
|
339 | (1) |
|
|
340 | (2) |
|
|
342 | (1) |
|
|
342 | (1) |
|
|
343 | (1) |
|
|
344 | (4) |
|
|
345 | (1) |
|
Handling Fragments from Activities |
|
|
346 | (1) |
|
Communicating with Fragments |
|
|
347 | (1) |
|
|
348 | (4) |
|
|
352 | (6) |
|
|
353 | (1) |
|
|
353 | (1) |
|
|
354 | (1) |
|
|
355 | (3) |
|
|
358 | (1) |
|
|
359 | (1) |
|
|
360 | (3) |
|
|
363 | (4) |
|
|
363 | (1) |
|
|
364 | (3) |
|
|
367 | (30) |
|
Writing Reusable Libraries in Kotlin |
|
|
367 | (5) |
|
Starting a Library Module |
|
|
368 | (1) |
|
|
368 | (1) |
|
|
369 | (1) |
|
|
370 | (1) |
|
|
371 | (1) |
|
Advanced Listeners Using Kotlin |
|
|
372 | (2) |
|
|
374 | (2) |
|
|
376 | (2) |
|
|
378 | (14) |
|
|
379 | (2) |
|
Top-Level Functions and Data |
|
|
381 | (1) |
|
|
382 | (2) |
|
|
384 | (1) |
|
|
385 | (1) |
|
|
386 | (1) |
|
|
387 | (1) |
|
|
388 | (1) |
|
Multiline String Literals |
|
|
389 | (1) |
|
Inner Functions and Classes |
|
|
389 | (1) |
|
|
390 | (1) |
|
|
390 | (1) |
|
|
391 | (1) |
|
|
392 | (1) |
|
|
392 | (5) |
|
Creating a JavaScript Module |
|
|
392 | (3) |
|
Using the JavaScript Module |
|
|
395 | (2) |
|
|
397 | (16) |
|
|
397 | (1) |
|
|
398 | (4) |
|
Module Common Configuration |
|
|
402 | (1) |
|
|
403 | (7) |
|
|
403 | (2) |
|
|
405 | (2) |
|
|
407 | (3) |
|
Running a Build from the Console |
|
|
410 | (1) |
|
|
411 | (2) |
|
|
413 | (50) |
|
|
413 | (2) |
|
Communication with Back Ends |
|
|
415 | (9) |
|
Communication with HttpsURLConnection |
|
|
416 | (3) |
|
|
419 | (3) |
|
|
422 | (2) |
|
|
424 | (13) |
|
|
425 | (2) |
|
Peer-to-Peer NFC Data Exchange |
|
|
427 | (1) |
|
|
428 | (9) |
|
|
437 | (26) |
|
A Bluetooth RfComm Server |
|
|
438 | (3) |
|
|
441 | (22) |
|
|
463 | (118) |
|
Programming with Wearables |
|
|
463 | (38) |
|
|
464 | (2) |
|
Wearables App User Interface |
|
|
466 | (1) |
|
|
467 | (1) |
|
Adding Face Complications |
|
|
468 | (17) |
|
Providing Complication Data |
|
|
485 | (4) |
|
Notifications on Wearables |
|
|
489 | (3) |
|
Controlling App Visibility on Wearables |
|
|
492 | (1) |
|
|
493 | (1) |
|
Voice Capabilities in Wear |
|
|
493 | (4) |
|
|
497 | (1) |
|
|
498 | (1) |
|
Data Communication in Wear |
|
|
498 | (3) |
|
Programming with Android TV |
|
|
501 | (15) |
|
|
501 | (1) |
|
Starting an Android TV Studio Project |
|
|
502 | (1) |
|
Android TV Hardware Features |
|
|
503 | (1) |
|
UI Development for Android TV |
|
|
503 | (2) |
|
Recommendation Channels for Content Search |
|
|
505 | (4) |
|
A Recommendation Row for Content Search |
|
|
509 | (5) |
|
Android TV Content Search |
|
|
514 | (1) |
|
|
515 | (1) |
|
|
516 | (1) |
|
Programming with Android Auto and Automotive OS |
|
|
516 | (1) |
|
Playing and Recording Sound |
|
|
516 | (9) |
|
|
517 | (3) |
|
|
520 | (4) |
|
|
524 | (1) |
|
|
525 | (43) |
|
|
525 | (5) |
|
|
530 | (2) |
|
Writing Your Own Camera App |
|
|
532 | (36) |
|
|
568 | (1) |
|
|
568 | (1) |
|
|
568 | (5) |
|
Retrieving Sensor Capabilities |
|
|
569 | (1) |
|
Listening to Sensor Events |
|
|
569 | (4) |
|
Interacting with Phone Calls |
|
|
573 | (6) |
|
Monitoring Phone State Changes |
|
|
573 | (5) |
|
Initiate a Dialing Process |
|
|
578 | (1) |
|
Create a Phone Call Custom UI |
|
|
579 | (1) |
|
Fingerprint Authentication |
|
|
579 | (2) |
|
|
581 | (18) |
|
|
582 | (8) |
|
|
582 | (1) |
|
Unit Tests with a Stubbed Android Framework |
|
|
583 | (1) |
|
Unit Tests with a Simulated Android Framework |
|
|
584 | (1) |
|
|
585 | (5) |
|
|
590 | (8) |
|
|
591 | (1) |
|
|
592 | (3) |
|
Testing Content Providers |
|
|
595 | (1) |
|
Testing Broadcast Receivers |
|
|
596 | (2) |
|
|
598 | (1) |
|
Chapter 16 Troubleshooting |
|
|
599 | (10) |
|
|
599 | (3) |
|
|
602 | (1) |
|
|
603 | (2) |
|
|
605 | (4) |
|
Chapter 17 Distributing Apps |
|
|
609 | (4) |
|
|
609 | (1) |
|
|
609 | (1) |
|
|
610 | (3) |
|
|
613 | (2) |
|
|
613 | (2) |
|
|
615 | (10) |
|
|
615 | (3) |
|
|
618 | (4) |
|
|
622 | (3) |
Appendix: Text Companion |
|
625 | (214) |
Index |
|
839 | |