Beginning Android Application Development

Front Cover
John Wiley & Sons, Mar 10, 2011 - Computers - 448 pages
4 Reviews
Create must-have applications for the latest Android OS

The Android OS is a popular and flexible platform for many of today's most in-demand mobile devices. This full-color guide offers you a hands-on introduction to creating Android applications for the latest mobile devices. Veteran author Wei Meng Lee accompanies each lesson with real-world examples to drive home the content he covers. Beginning with an overview of core Android features and tools, he moves at a steady pace while teaching everything you need to know to successfully develop your own Android applications.

  • Explains what an activity is and reviews its lifecycle
  • Zeroes in on customizing activities by applying styles and themes
  • Looks at the components of a screen, including LinearLayout, AbsoluteLayout, and RelativeLayout, among others
  • Details ways to adapt to different screen sizes and adjust display orientation
  • Reviews the variety of views such as TextView, ProgressBar, TimePicker, and more

Beginning Android Application Development pares down the most essential steps you need to know so you can start creating Android applications today.

 

What people are saying - Write a review

User Review - Flag as inappropriate

Fast paced but a bit disjointed. For example, it explains dialogs in the beginning chapters then gives source codes using the Builder class but never explains how the class works. I'm left wondering how the program works? Checked the appendix but no reference on Builder. Understandable if it was the advanced chapters where the reader has a good understanding but in chapter 2! The reader has to stop and google the relevant info or we're supposed to just key in or copy the programs without understanding? 

User Review - Flag as inappropriate

Updated from one star: the previous formatting issues were fixed. Its finally readable on mobile devices.
This was the text used in a college class on Android application development. This is a
good place to start, it is a general overview of Android application development.
People with a general understanding of programming should be able to understand the concepts presented in this book. The author does a decent job of explaining, and supports his text with plenty of examples.
 

Selected pages

Contents

GETTING STARTED WITH ANDROID PROGRAMMING
1
What Is Android?
2
Features of Android
3
Android Devices in the Market
4
The Android Market
6
Eclipse
7
Creating Android Virtual Devices AVDs
11
Creating Your First Android Application
14
Using the Database Programmatically
224
PreCreating the Database
230
Summary
234
CONTENT PROVIDERS
237
Using a Content Provider
238
Predefined Query String Constants
243
Projections
246
Sorting
247

Anatomy of an Android Application
22
Summary
25
ACTIVITIES AND INTENTS
27
Applying Styles and Themes to Activity
32
Hiding the Activity Title
33
Displaying a Dialog Window
34
Displaying a Progress Dialog
39
Linking Activities Using Intents
43
Resolving Intent Filter Collision
48
Returning Results from an Intent
50
Passing Data Using an Intent Object
54
Calling BuiltIn Applications Using Intents
56
Understanding the Intent Object
64
Using Intent Filters
65
Adding Categories
71
Displaying Notifications
73
Summary
78
GETTING TO KNOW THE ANDROID USER INTERFACE
81
Views and ViewGroups
82
LinearLayout
83
AbsoluteLayout
87
TableLayout
89
RelativeLayout
91
FrameLayout
93
ScrollView
95
Adapting to Display Orientation
97
Anchoring Views
98
Resizing and Repositioning
101
Managing Changes to Screen Orientation
104
Persisting State Information during Changes in Configuration
108
Detecting Orientation Changes
109
Controlling the Orientation of the Activity
110
Creating the User Interface Programmatically
111
Listening for UI Notifications
114
Registering Events for Views
119
Summary
122
DESIGNING TOUR USER INTERFACE USING VIEWS
125
Basic Views
126
Button ImageButton EditText CheckBox ToggleButton RadioButton and RadioGroup Views
127
ProgressBar View
135
AutoCompleteTextView View
141
Pickers Views
144
DatePicker View
149
List Views
156
Using the Spinner View
162
Summary
166
DISPLAYING PICTURES AND MENUS WITH VIEWS
169
Gallery and ImageView Views
170
ImageSwitcher
177
GridView
181
Using Menus with Views
185
Creating the Helper Methods
186
Options Menu
188
Context Menu
190
Some Additional Views
193
AnalogClock and DigitalClock Views
194
Summary
200
DATA PERSISTENCE
203
Using getSharedPreferences
204
Using getPreferences
208
Persisting Data to Files
209
Saving to External Storage SD Card
214
Choosing the Best Storage Option
216
Using Static Resources
217
Creating and Using Databases
218
Using the Content Provider
256
Summary
260
MESSAGING AND NETWORKING
263
Sending SMS Messages Programmatically
264
Getting Feedback after Sending the Message
267
Sending SMS Messages Using Intent
269
Receiving SMS Messages
270
Caveats and Warnings
280
Sending EMail
281
Networking
284
Downloading Binary Data
286
Downloading Text Files
288
Accessing Web Services
291
Performing Asynchronous Calls
296
Summary
297
LOCATIONBASED SERVICES
301
Displaying Maps
302
Obtaining the Maps API Key
303
Displaying the Map
305
Displaying the Zoom Control
308
Changing Views
310
Navigating to a Specific Location
312
Adding Markers
315
Getting the Location That Was Touched
318
Geocoding and Reverse Geocoding
320
Getting Location Data
322
Monitoring a Location
327
DEVELOPING ANDROID SERVICES
331
Performing LongRunning Tasks in a Service
336
Performing Repeated Tasks in a Service
341
Executing Asynchronous Tasks on Separate Threads Using IntentService
343
Communicating between a Service and an Activity
346
Binding Activities to Services
350
Summary
356
PUBLISHING ANDROID APPLICATIONS
359
Versioning
360
Digitally Signing Your Android Applications
362
Deploying APK Files
367
Using a Web Server
369
Publishing on the Android Market
372
Summary
378
USING ECLIPSE FOR ANDROID DEVELOPMENT
381
Package Explorer
382
Using Projects from Other Workspaces
383
Editors
385
Perspectives
387
Code Completion
388
Debugging
389
Exceptions
390
USING THE ANDROID EMULATOR
393
Emulating Real Devices
398
SD Card Emulation
399
Emulating Devices with Different Screen Sizes
401
Emulating Physical Capabilities
402
Sending SMS Messages to the Emulator
403
Making Phone Calls
406
Transferring Files into and out of the Emulator
407
Resetting the Emulator
409
ANSWERS TO EXERCISES
411
Chapter 3 Answers
412
Chapter 6 Answers
413
Chapter 10 Answers
414
INDEX
415
Copyright

Other editions - View all

Common terms and phrases

About the author (2011)

Wei-Meng Lee is a technologist and founder of Developer Learning Solutions (www.learn2develop.net). He writes extensively for online publications and magazines on topics ranging from .NET to Mac OS X. In addition, he is the author of Beginning iOS 4 Application Development, as well as many other technology books and articles.

Bibliographic information