Wiley.com
Print this page Share

Professional Android 2 Application Development

ISBN: 978-0-470-56552-0
Paperback
576 pages
March 2010
Professional Android 2 Application Development (0470565527) cover image
This title is out-of-print and not currently available for purchase from this site.

INTRODUCTION xxvii

CHAPTER 1: HELLO, ANDROID 1

A Little Background 2

What It Isn’t 3

Android: An Open Platform for Mobile Development 4

Native Android Applications 5

Android SDK Features 6

Introducing the Open Handset Alliance 9

What Does Android Run On? 9

Why Develop for Mobile? 9

Why Develop for Android? 10

Introducing the Development Framework 12

Summary 16

CHAPTER 2: GETTING STARTED 17

Developing for Android 18

Developing for Mobile Devices 30

To-Do List Example 38

Android Development Tools 43

Summary 48

CHAPTER 3: CREATING APPLICATIONS AND ACTIVITIES 49

What Makes an Android Application? 50

Introducing the Application Manifest 51

Using the Manifest Editor 56

The Android Application Life Cycle 57

Understanding Application Priority and Process States 58

Externalizing Resources 59

Introducing the Android Application Class 74

A Closer Look at Android Activities 76

Summary 84

CHAPTER 4: CREATING USER INTERFACES 85

Fundamental Android UI Design 86

Introducing Views 86

Introducing Layouts 89

Creating New Views 91

Drawable Resources 111

Resolution and Density Independence 117

Creating and Using Menus 123

Summary 136

CHAPTER 5: INTENTS, BROADCAST RECEIVERS, ADAPTERS, AND THE INTERNET 137

Introducing Intents 138

Introducing Pending Intents 162

Introducing Adapters 163

Using Internet Resources 170

Introducing Dialogs 172

Creating an Earthquake Viewer 176

Summary 184

CHAPTER 6: FILES, SAVING STATE, AND PREFERENCES 187

Saving Simple Application Data 188

Creating and Saving Preferences 188

Retrieving Shared Preferences 189

Creating a Settings Activity for the Earthquake Viewer 189

Introducing the Preference Activity and Preferences Framework 197

Creating a Standard Preference Activity for the Earthquake Viewer 202

Saving Activity State 203

Saving and Loading Files 207

Including Static Files as Resources 207

File Management Tools 208

Summary 208

CHAPTER 7: DATABASES AND CONTENT PROVIDERS 209

Introducing Android Databases 209

Introducing SQLite 210

Cursors and Content Values 211

Working with SQLite Databases 211

Creating a New Content Provider 224

Using Content Providers 227

Creating and Using an Earthquake Content Provider 230

Native Android Content Providers 238

Summary 244

CHAPTER 8: MAPS, GEOCODING, AND LOCATION-BASED SERVICES 245

Using Location-Based Services 246

Configuring the Emulator to Test Location-Based Services 246

Updating Locations in Emulator Location Providers 246

Selecting a Location Provider 247

Finding Your Location 249

Using Proximity Alerts 255

Using the Geocoder 256

Creating Map-Based Activities 260

Mapping Earthquakes Example 279

Summary 284

CHAPTER 9: WORKING IN THE BACKGROUND 285

Introducing Services 286

Using Background Threads 300

Let’s Make a Toast 306

Introducing Notifications 309

Using Alarms 320

Summary 325

CHAPTER 10: INVADING THE PHONE-TOP 327

Introducing Home-Screen Widgets 328

Creating App Widgets 328

Creating an Earthquake Widget 341

Introducing Live Folders 346

Adding Search to Your Applications and the Quick Search Box 351

Creating Live Wallpaper 358

Summary 361

CHAPTER 11: AUDIO, VIDEO, AND USING THE CAMERA 363

Playing Audio and Video 364

Recording Audio and Video 371

Using the Camera and Taking Pictures 375

Adding New Media to the Media Store 382

Raw Audio Manipulation 384

Speech Recognition 386

Summary 388

CHAPTER 12: TELEPHONY AND SMS 389

Telephony 390

Introducing SMS and MMS 398

Summary 423

CHAPTER 13: BLUETOOTH, NETWORKS, AND WI-FI 425

Using Bluetooth 425

Managing Network Connectivity 448

Managing Your Wi-Fi 452

Summary 455

CHAPTER 14: SENSORS 457

Using Sensors and the Sensor Manager 458

Interpreting Sensor Values 461

Using the Compass, Accelerometer, and Orientation Sensors 462

Controlling Device Vibration 474

Summary 475

CHAPTER 15: ADVANCED ANDROID DEVELOPMENT 477

Paranoid Android 478

Using Wake Locks 480

Introducing Android Text to Speech 481

Using AIDL to Support IPC for Services 483

Using Internet Services 488

Building Rich User Interfaces 489

Summary 526

INDEX 529

Related Titles

General Programming & Software Development

by David Caruana, John Newton, Michael Farman, Michael Uzquiano, Kevin Roast
by Michael Trent, Drew McCormack
by Randy Drisgill, John Ross, Jacob J. Sanford, Paul Stubbs, Larry Riemann, Elisabeth Olson (Foreword by)
by Mark Bennett, Jeff Fried, Miles Kehoe, Natalya Voskresenskaya
Back to Top