What Is Android? 2: Chapter 1: Getting Started With Android Programming Xxi 1
What Is Android? 2: Chapter 1: Getting Started With Android Programming Xxi 1
INTRODUCTION
CHAPTER 1: GETTING STARTED WITH ANDROID PROGRAMMING
What Is Android?
Android Versions
Features of Android
Architecture of Android
Android Devices in the Market
The Android Market
The Android Developer Community
Understanding Activities
Applying Styles and Themes to an Activity
Hiding the Activity Title
Displaying a Dialog Window
Displaying a Progress Dialog
Displaying a More Sophisticated Progress Dialog
Fragments
Adding Fragments Dynamically
Life Cycle of a Fragment
Interactions between Fragments
xxi
1
2
2
3
4
6
8
9
9
10
11
12
14
15
17
20
29
33
35
36
41
41
42
47
50
53
58
59
63
69
73
76
80
CONTENTS
Displaying Notications
Summary
CHAPTER 3: GETTING TO KNOW THE ANDROID USER INTERFACE
89
91
96
98
103
105
105
106
107
115
116
117
118
121
123
125
127
130
133
135
135
Summary
CHAPTER 4: DESIGNING YOUR USER INTERFACE WITH VIEWS
85
136
139
144
146
148
149
152
156
159
160
160
161
171
177
179
CONTENTS
TimePicker View
DatePicker View
Summary
CHAPTER 5: DISPLAYING PICTURES AND MENUS WITH VIEWS
Summary
CHAPTER 6: DATA PERSISTENCE
Summary
179
184
191
191
199
202
202
207
210
214
219
219
220
226
231
234
235
238
240
242
242
243
249
251
251
252
259
261
263
263
268
271
272
273
273
279
285
289
xvii
CONTENTS
SMS Messaging
Sending SMS Messages Programmatically
Getting Feedback after Sending a Message
Sending SMS Messages Using Intent
Receiving SMS Messages
Caveats and Warnings
Sending E-mail
Summary
CHAPTER 9: LOCATION-BASED SERVICES
Displaying Maps
Creating the Project
Obtaining the Maps API Key
Displaying the Map
Displaying the Zoom Control
Changing Views
Navigating to a Specic Location
Adding Markers
Getting the Location That Was Touched
Geocoding and Reverse Geocoding
293
293
294
300
303
304
305
305
314
319
321
321
322
325
328
329
344
345
347
351
352
352
353
355
358
361
363
366
369
371
375
384
385
390
393
393
396
CONTENTS
402
404
409
417
426
429
429
445
449
454
460
463
Summary
APPENDIX A: USING ECLIPSE FOR ANDROID DEVELOPMENT
463
464
466
471
471
474
476
481
483
483
483
485
486
487
490
490
491
492
494
495
497
xix
CONTENTS
xx
499
499
501
502
504
506
508
509
511
513
515
INDEX
521