Android is a software toolkit for mobile phones, created by Google and the Open Handset Alliance. It's inside millions of cell phones and other mobile devices, making Android a major platform for application developers. That could be your own program running on all those devices. Within minutes, Hello, Android will get you started creating your first working application: Android's version of "Hello, World." From there, you'll build up a more substantial example: an Android Sudoku game. By gradually adding features to the game, you'll learn the basics of Android programming. You'll also see how to build in audio and video support, add graphics using 2D and 3D OpenGL, network with web pages and web services, and store data with SQLite. You'll also learn how to publish your applications to the Android Market. The #1 book for learning Android is now in its third edition. Every page and example was reviewed and updated for compatibility with the latest versions. Freshly added material covers installing applications to the SD card, supporting multi-touch, and creating live wallpaper. You'll also find plenty of real-world advice on how to support all the Android versions in use today-everything from Cupcake (Android 1.5) to FroYo (Android 2.2) and beyond. If you'd rather be coding than reading about coding, this book is for you.
Author(s): Ed Burnette
Edition: Third Edition
Publisher: Pragmatic Bookshelf
Year: 2010
Language: English
Pages: 300
Contents......Page 5
Acknowledgments......Page 9
What Makes Android Special?......Page 10
Who Should Read This Book?......Page 11
What's New in the Third Edition?......Page 12
Fast-Forward >>......Page 14
Introducing Android......Page 16
Installing the Tools......Page 17
Running on the Emulator......Page 23
Running on a Real Phone......Page 28
Fast-Forward >>......Page 29
The Big Picture......Page 30
It's Alive!......Page 35
Building Blocks......Page 39
Safe and Secure......Page 40
Fast-Forward >>......Page 41
Android Basics......Page 42
Introducing the Sudoku Example......Page 43
Designing by Declaration......Page 44
Creating the Opening Screen......Page 45
Using Alternate Resources......Page 55
Implementing an About Box......Page 57
Applying a Theme......Page 61
Adding a Menu......Page 64
Adding Settings......Page 65
Starting a New Game......Page 66
Debugging......Page 69
Fast-Forward >>......Page 71
Learning the Basics......Page 73
Adding Graphics to Sudoku......Page 78
Handling Input......Page 87
The Rest of the Story......Page 93
Fast-Forward >>......Page 103
Playing Audio......Page 105
Playing Video......Page 112
Adding Sounds to Sudoku......Page 115
Fast-Forward >>......Page 119
Adding Options to Sudoku......Page 120
Continuing an Old Game......Page 122
Remembering the Current Position......Page 124
Accessing the Internal File System......Page 126
Accessing SD Cards......Page 127
Fast-Forward >>......Page 128
Beyond the Basics......Page 129
The Connected World......Page 130
Browsing by Intent......Page 131
Web with a View......Page 135
From JavaScript to Java and Back......Page 140
Using Web Services......Page 147
Fast-Forward >>......Page 160
Location, Location, Location......Page 161
Set Sensors to Maximum......Page 168
Bird's-Eye View......Page 172
Fast-Forward >>......Page 177
Introducing SQLite......Page 178
SQL 101......Page 179
Hello, Database......Page 181
Data Binding......Page 189
Using a ContentProvider......Page 192
Implementing a ContentProvider......Page 195
Fast-Forward >>......Page 196
Understanding 3D Graphics......Page 198
Introducing OpenGL......Page 199
Building an OpenGL Program......Page 200
Rendering the Scene......Page 202
Building a Model......Page 206
Lights, Camera, .........Page 209
Applying Texture......Page 212
Peekaboo......Page 216
Measuring Smoothness......Page 217
Fast-Forward >>......Page 218
The Next Generation......Page 219
Introducing Multi-Touch......Page 220
Building the Touch Example......Page 222
Understanding Touch Events......Page 225
Setting Up for Image Transformation......Page 228
Implementing the Drag Gesture......Page 229
Implementing the Pinch Zoom Gesture......Page 230
Fast-Forward >>......Page 232
Hello, Widget......Page 233
Live Wallpaper......Page 242
Fast-Forward >>......Page 254
Write Once, Test Everywhere......Page 256
Building for Multiple Versions......Page 257
Evolving with Android APIs......Page 259
Bug on Parade......Page 265
All Screens Great and Small......Page 267
Installing on the SD Card......Page 268
Fast-Forward >>......Page 270
Preparing......Page 271
Signing......Page 272
Publishing......Page 273
Updating......Page 275
Closing Thoughts......Page 276
Appendixes......Page 277
Language Subset......Page 278
Standard Library Subset......Page 280
Third-Party Libraries......Page 281
Bibliography......Page 282
A......Page 283
D......Page 284
G......Page 285
H......Page 286
L......Page 287
O......Page 288
P......Page 289
S......Page 290
W......Page 292
Z......Page 293