Ebook Beginning Android Application Development

Beginning Android Application Development
Beginning Android Application Development

Download

THÔNG TIN TÀI LIỆU

Nhà xuất bản Wiley Publishing, Inc
Tác giả Wei-Meng Lee
Số trang 450
Ngày xuất bản 2011
File PDF

NỘI DUNG TÀI LIỆU
chApter 1: getting StArted With Android progrAmming 1
What is Android? 2
Android Versions 2
Features of Android 3
Architecture of Android 3
Android Devices in the Market 4
The Android Market 6
Obtaining the Required Tools 6
Eclipse 7
Android SDK 7
Android Development Tools (ADT) 7
Creating Android Virtual Devices (AVDs) 11
Creating Your First Android Application 14
Anatomy of an Android Application 22
Summary 25

chApter 2: ActivitieS And intentS 27
Understanding Activities 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 Built-in Applications Using intents 56
Understanding the Intent Object 64
Using Intent Filters 65
Adding Categories 71
Displaying notifcations 73
Summary 78

chApter 3: getting to knoW the Android uSer interFAce 81
Understanding the Components of a Screen 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 Confguration 108
Detecting Orientation Changes 109
Controlling the Orientation of the Activity 110
Creating the User interface Programmatically 111
Listening for Ui notifcations 114
Overriding Methods Defned in an Activity 114
Registering Events for Views 119
Summary 122

chApter 4: deSigning your uSer interFAce uSing vieWS 125
Basic Views 126
TextView View 126
Button, ImageButton, EditText, CheckBox, ToggleButton, RadioButton,
and RadioGroup Views 127
ProgressBar View 135
AutoCompleteTextView View 141
Picker Views 144
TimePicker View 144
Displaying the TimePicker in a Dialog Window 147
DatePicker View 149
Displaying the DatePicker View in a Dialog Window 153
List Views 156
ListView View 156
Customizing the ListView 159
Using the Spinner View 162
Summary 166

chApter 5: diSplAying pictureS And menuS With vieWS 169
Using image Views to Display Pictures 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
WebView 194
Summary 200
chApter 6: dAtA perSiStence 203
Saving and Loading User Preferences 203
Using getSharedPreferences() 204
Using getPreferences() 208
Persisting Data to Files 209
Saving to Internal Storage 209
Saving to External Storage (SD Card) 214
Choosing the Best Storage Option 216
Using Static Resources 217
Creating and Using Databases 218
Creating the DBAdapter Helper Class 218
Using the Database Programmatically 224
Adding Contacts 224
Retrieving All the Contacts 225
Retrieving a Single Contact 226
Updating a Contact 227
Deleting a Contact 228
Upgrading the Database 230
Pre-Creating the Database 230
Bundling the Database with an Application 231
Summary 234

chApter 7: content providerS 237
Sharing Data in Android 237
Using a Content Provider 238
Predefned Query String Constants 243
Projections 246
Filtering 246
Sorting 247
Creating Your Own Content Providers 247
Using the Content Provider 256
Summary 260

chApter 8: meSSAging And netWorking 263
SMS Messaging 263
Sending SMS Messages Programmatically 264
Getting Feedback After Sending the Message 267
Sending SMS Messages Using Intent 269
Receiving SMS Messages 270
Updating an Activity from a BroadcastReceiver 273
Invoking an Activity from a BroadcastReceiver 277
Caveats and Warnings 280
Sending e-Mail 281
networking 284
Downloading Binary Data 286
Downloading Text Files 288
Accessing Web Services 291
Performing Asynchronous Calls 296
Summary 297

chApter 9: locAtion-BASed ServiceS 301
Displaying Maps 302
Creating the Project 302
Obtaining the Maps API Key 303
Displaying the Map 305
Displaying the Zoom Control 308
Changing Views 310
Navigating to a Specifc 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
Summary 327

chApter 10: developing Android ServiceS 331
Creating Your Own Services 331
Performing Long-Running 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

chApter 11: puBliShing Android ApplicAtionS 359
Preparing for Publishing 359
Versioning 360
Digitally Signing Your Android Applications 362
Deploying APK Files 367
Using the adb exe Tool 367
Using a Web Server 369
Publishing on the Android Market 372
Creating a Developer Profle 372
Submitting Your Apps 373
Summary 378

Be the first to comment

Leave a Reply

Your email address will not be published.

*