Skip to:Content
|
Bottom
Cover image for Beginning android 4 application development
Title:
Beginning android 4 application development
Personal Author:
Publication Information:
Indianapolis, IN : Wiley Pub., Inc., 2012
Physical Description:
xxvi, 533 p. : ill. ; 23 cm.
ISBN:
9781118199541
General Note:
Includes index

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000010298139 QA76.76.A65 L44 2012 Open Access Book Book
Searching...

On Order

Summary

Summary

Understand Android OS for both smartphone and tablet programming

This fast-paced introduction to the newest release of Android OS gives aspiring mobile app developers what they need to know to program for today's hottest Android smartphones and tablets. Android 4 OS is, for the first time, a single solution for both smartphones and tablets, so if you master the information in this helpful guide, you'll be well on your way to successful development for both devices. From using activities and intents and creating rich user interfaces to working with SMS, messaging APIs, and the Android SDK, what you need is here.

Provides clear instructions backed by real-world programming examples Begins with the basics and covers everything Android 4 developers need to know for both smartphones and tablets Explains how to customize activities and intents, create rich user interfaces, and manage data Helps you work with SMS and messaging APIs, the Android SDK, and using location-based services Details how to package and publish your applications to the Android Market

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


Author Notes

Wei-Meng Lee is a technologist and founder of Developer Learning Solutions, a technology company specializing in hands-on training in the latest Microsoft and Apple technologies. He is the author of Beginning Android Application Development and Beginning iOS 5 Application Development, as well as many other technology books and articles.


Table of Contents

Introductionp. xxi
Chapter 1 Getting Started With Android Programmingp. 1
What Is Android?p. 2
Android Versionsp. 2
Features of Androidp. 3
Architecture of Androidp. 4
Android Devices in the Marketp. 6
The Android Marketp. 8
The Android Developer Communityp. 9
Obtaining the Required Toolsp. 9
Android SDKp. 10
Installing the Android SDK Toolsp. 11
Confi guring the Android SDK Managerp. 12
Eclipsep. 14
Android Development Tools (ADT)p. 15
Creating Android Virtual Devices (AVDs)p. 17
Creating Your First Android Applicationp. 20
Anatomy of an Android Applicationp. 29
Summaryp. 33
Chapter 2 Activities, Fragments, And Intentsp. 35
Understanding Activitiesp. 36
Applying Styles and Themes to an Activityp. 41
Hiding the Activity Titlep. 41
Displaying a Dialog Windowp. 42
Displaying a Progress Dialogp. 47
Displaying a More Sophisticated Progress Dialogp. 50
Linking Activities Using Intentsp. 53
Resolving Intent Filter Collisionp. 58
Returning Results from an Intentp. 59
Passing Data Using an Intent Objectp. 63
Fragmentsp. 69
Adding Fragments Dynamicallyp. 73
Life Cycle of a Fragmentp. 76
Interactions between Fragmentsp. 80
Calling Built-In Applications Using Intentsp. 85
Understanding the Intent Objectp. 89
Using Intent Filtersp. 91
Adding Categoriesp. 96
Displaying Notificationsp. 98
Summaryp. 103
Chapter 3 Getting To Know The Android User Interfacep. 105
Understanding the Components of a Screenp. 105
Views and ViewGroupsp. 106
LinearLayoutp. 107
AbsoluteLayoutp. 115
TableLayoutp. 116
RelativeLayoutp. 117
FrameLayoutp. 118
ScrollViewp. 121
Adapting to Display Orientationp. 123
Anchoring Viewsp. 125
Resizing and Repositioningp. 127
Managing Changes to Screen Orientationp. 130
Persisting State Information during Changes in Confi gurationp. 133
Detecting Orientation Changesp. 135
Controlling the Orientation of the Activityp. 135
Utilizing the Action Barp. 136
Adding Action Items to the Action Barp. 139
Customizing the Action Items and Application Iconp. 144
Creating the User Interface Programmaticallyp. 146
Listening for UI Notificationsp. 148
Overriding Methods Defined in an Activityp. 149
Registering Events for Viewsp. 152
Summaryp. 156
Chapter 4 Designing Your User Interface With Viewsp. 159
Using Basic Viewsp. 160
TextView Viewp. 160
Button, ImageButton, EditText, CheckBox, ToggleButton, RadioButton, and RadioGroup Viewsp. 161
ProgressBar Viewp. 171
AutoCompleteTextView Viewp. 177
Using Picker Viewsp. 179
TimePicker Viewp. 179
DatePicker Viewp. 184
Using List Views to Display Long Listsp. 191
ListView Viewp. 191
Using the Spinner Viewp. 199
Understanding Specialized Fragmentsp. 202
Using a ListFragmentp. 202
Using a DialogFragmentp. 207
Using a PreferenceFragmentp. 210
Summaryp. 214
Chapter 5 Displaying Pictures And Menus With Viewsp. 219
Using Image Views to Display Picturesp. 219
Gallery and ImageView Viewsp. 220
ImageSwitcherp. 226
GridViewp. 231
Using Menus with Viewsp. 234
Creating the Helper Methodsp. 235
Options Menup. 238
Context Menup. 240
Some Additional Viewsp. 242
AnalogClock and DigitalClock Viewsp. 242
WebViewp. 243
Summaryp. 249
Chapter 6 Data Persistencep. 251
Saving and Loading User Preferencesp. 251
Accessing Preferences Using an Activityp. 252
Programmatically Retrieving and Modifying the Preferences Valuesp. 259
Changing the Default Name of the Preferences Filep. 261
Persisting Data to Filesp. 263
Saving to Internal Storagep. 263
Saving to External Storage (SD Card)p. 268
Choosing the Best Storage Optionp. 271
Using Static Resourcesp. 272
Creating and Using Databasesp. 273
Creating the DBAdapter Helper Classp. 273
Using the Database Programmaticallyp. 279
Pre-Creating the Databasep. 285
Summaryp. 289
Chapter 7 Content Providersp. 293
Sharing Data in Androidp. 293
Using a Content Providerp. 294
Predefi ned Query String Constantsp. 300
Projectionsp. 303
Filteringp. 304
Sortingp. 305
Creating Your Own Content Providersp. 305
Using the Content Providerp. 314
Summaryp. 319
Chapter 8 Messagingp. 321
SMS Messagingp. 321
Sending SMS Messages Programmaticallyp. 322
Getting Feedback after Sending a Messagep. 325
Sending SMS Messages Using Intentp. 328
Receiving SMS Messagesp. 329
Caveats and Warningsp. 344
Sending E-mailp. 345
Summaryp. 347
Chapter 9 Location-Based Servicesp. 351
Displaying Mapsp. 352
Creating the Projectp. 352
Obtaining the Maps API Keyp. 353
Displaying the Mapp. 355
Displaying the Zoom Controlp. 358
Changing Viewsp. 361
Navigating to a Specific Locationp. 363
Adding Markersp. 366
Getting the Location That Was Touchedp. 369
Geocoding and Reverse Geocodingp. 371
Getting Location Datap. 375
Monitoring a Locationp. 384
Project - Building a Location Trackerp. 385
Summaryp. 390
Chapter 10 Networkingp. 393
Consuming Web Services Using HTTPp. 393
Downloading Binary Datap. 396
Downloading Text Contentp. 402
Accessing Web Services Using the GET Methodp. 404
Consuming JSON Servicesp. 409
Sockets Programmingp. 417
Summaryp. 426
Chapter 11 Developing Android Servicesp. 429
Creating Your Own Servicesp. 429
Performing Long-Running Tasks in a Servicep. 433
Performing Repeated Tasks in a Servicep. 439
Executing Asynchronous Tasks on Separate Threads Using IntentServicep. 442
Establishing Communication between a Service and an Activityp. 445
Binding Activities to Servicesp. 449
Understanding Threadingp. 454
Summaryp. 460
Chapter 12 Publishing Android Applicationsp. 463
Preparing For Publishingp. 463
Versioning Your Applicationp. 464
Digitally Signing Your Android Applicationsp. 466
Deploying APK Filesp. 471
Using the adb.exe Toolp. 471
Using a Web Serverp. 474
Publishing on the Android Marketp. 476
Summaryp. 481
Appendix A Using Eclipse For Android Developmentp. 483
Getting Around in Eclipsep. 483
Workspacesp. 483
Package Explorerp. 485
Using Projects from Other Workspacesp. 486
Using Editors within Eclipsep. 487
Understanding Eclipse Perspectivesp. 490
Automatically Importing Packagesp. 490
Using the Code Completion Featurep. 491
Refactoringp. 492
Debugging your Applicationp. 494
Setting Breakpointsp. 495
Dealing with Exceptionsp. 497
Appendix B USING THE ANDROID EMULATORp. 499
Uses of the Android Emulatorp. 499
Creating Snapshotsp. 501
SD Card Emulationp. 502
Emulating Devices with Different Screen Sizesp. 504
Emulating Physical Capabilitiesp. 506
Sending SMS Messages to the Emulatorp. 508
Making Phone Callsp. 509
Transferring Files into and out of the Emulatorp. 511
Resetting the Emulatorp. 513
Appendix C Answers To Exercisesp. 515
Indexp. 521
Go to:Top of Page