Apress Pro Android 4 [Komatineni & MacLean 2012-03-05](1).pdf

(32321 KB) Pobierz
850633668.012.png
For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
850633668.013.png 850633668.014.png
Contents at a Glance
Contents ............................................................................................................. vi
About the Authors............................................................................................. xxi
About the Technical Reviewers ....................................................................... xxii
Acknowledgments .......................................................................................... xxiv
Preface ............................................................................................................ xxv
Chapter 1: Introducing the Android Computing Platform................................ 1
Chapter 2: Setting Up Your Development Environment ................................. 23
Chapter 3: Understanding Android Resources .............................................. 51
Chapter 4: Understanding Content Providers ................................................ 79
Chapter 5: Understanding Intents................................................................ 113
Chapter 6: Building User Interfaces and Using Controls ............................. 135
Chapter 7: Working with Menus .................................................................. 203
Chapter 8: Fragments for Tablets and More................................................ 229
Chapter 9: Working with Dialogs................................................................. 261
Chapter 10: Exploring ActionBar ................................................................. 281
Chapter 11: Advanced Debugging and Analysis.......................................... 315
Chapter 12: Responding to Configuration Changes ..................................... 331
Chapter 13: Working with Preferences and Saving State ........................... 339
Chapter 14: Exploring Security and Permissions ........................................ 363
iv
850633668.015.png 850633668.001.png 850633668.002.png 850633668.003.png 850633668.004.png
 
CONTENTS AT A GLANCE
Chapter 15: Building and Consuming Services ........................................... 383
Chapter 16: Exploring Packages ................................................................. 441
Chapter 17: Exploring Handlers................................................................... 469
Chapter 18: Exploring the AsyncTask.......................................................... 489
Chapter 19: Broadcast Receivers and Long-Running Services ................... 503
Chapter 20: Exploring the Alarm Manager .................................................. 539
Chapter 21: Exploring 2D Animation ........................................................... 555
Chapter 22: Exploring Maps and Location-based Services ......................... 599
Chapter 23: Using the Telephony APIs ........................................................ 641
Chapter 24: Understanding the Media Frameworks.................................... 659
Chapter 25: Home Screen Widgets .............................................................. 709
Chapter 26: Exploring List Widgets ............................................................. 745
Chapter 27: Touch Screens.......................................................................... 775
Chapter 28: Implementing Drag and Drop ................................................... 813
Chapter 29: Using Sensors .......................................................................... 833
Chapter 30: Exploring the Contacts API ...................................................... 873
Chapter 31: Deploying Your Application: Android Market and Beyond ....... 927
Index ............................................................................................................... 951
v
850633668.005.png
1
Chapter
Introducing the Android
Computing Platform
Computing is more accessible than ever before. Handheld devices have transformed
into computing platforms. Be it a phone or a tablet, the mobile device is now so capable
of general-purpose computing that it’s becoming the real personal computer (PC). Every
traditional PC manufacturer is producing devices of various form factors based on the
Android OS. The battles between operating systems, computing platforms,
programming languages, and development frameworks are being shifted and reapplied
to mobile devices.
We are also seeing a surge in mobile programming as more and more IT applications
start to offer mobile counterparts. In this book, we’ll show you how to take advantage of
your Java skills to write programs for devices that run on Google’s Android platform
( http://developer.android.com/index.html ), an open source platform for mobile and
tablet development.
NOTE: We are excited about Android because it is an advanced Java-based platform that
introduces a number of new paradigms in framework design (even with the limitations of a
mobile platform).
In this chapter, we’ll provide an overview of Android and its SDK, give a brief overview of
key packages, introduce what we are going to cover in each chapter, show you how to
take advantage of Android source code, and highlight the benefits of programming for
the Android platform.
A New Platform for a New Personal Computer
The Android platform embraces the idea of general-purpose computing for handheld
devices. It is a comprehensive platform that features a Linux-based operating system
stack for managing devices, memory, and processes. Android’s Java libraries cover
1
850633668.006.png 850633668.007.png 850633668.008.png 850633668.009.png 850633668.010.png 850633668.011.png
 
Zgłoś jeśli naruszono regulamin