Part 1 Basics Chapter 1 Overview of Android 2 1.1 The history of Android 3 1.1.1 The origin of Android 3 1.1.2 The development of Android 3 1.2 Android platform architecture and features 4 1.2.1 Android platform features 5 1.2.2 Android platform architecture 5 1.3 Android Market 7 1.4 Android application components 8 1.4.1 Activity 9 1.4.2 Service 9 1.4.3 Broadcast Receiver 9 1.4.4 ContentProvider 9 1.4.5 View 10 1.4.6 Intent 10 1.5 The difference and connection between Android and Java ME 10 1.5.1 The difference between the two 10 1.5.2 The connection between the two 10 1.5.3 The advantages of each 11 Chapter 2 Android Development Basics 12 2.1 Building an Android development environment 12 2.1.1 Downloading the Android SDK 13 2.1.2 Downloading and installing JDK 15 2.1.3 Download Eclipse 16 2.1.4 Download and install ADT 16 2.2 Use common Android tools 18 2.2.1 Create Android Virtual Devices (AVD) 18 2.2.2 Use the emulator 20 2.2.3 Use Android Debug Bridge (ADB) 20 2.2.4 Use Dalvik Debug Monitor Service (DDMS) 21 2.2.5 Use Android Asset Packaging Tool (AAPT) 22 2.2.6 Use DX 22 2.2.7 Use mksdcard 22 2.3 My first Android application 22 2.3.1 Create an Android application manually 22 2.3.2 Create an Android application using Eclipse 25 Part 2 Technical Chapter 3 Resource Access in Android 32 3.1 Introduction to Resources 33 3.1.1 Resource Types and Layouts 33 3.1.2 Use of Resource Files 33 3.2 3.2.1 Definition of color value 3.2.2 Definition of color resource XML file 3.2.3 Using color resources 3.3 Using string resources 3.3.1 Definition of string resource XML file 3.3.2 Use of string resource XML file 3.4 Using dimension resources 3.4.1 Dimension units supported by Android 3.4.2 Definition of dimension resource XML file 4.4.3 Use of dimension resource XML file 4.5 3.5 Using raw XML resources 4.6 3.5.1 Definition of raw XML resource file 4.6 3.5.2 Use of raw XML file 4.7 3.6 Using drawables resources 4.8 3.8.1 Definition of layout file 4.8 3.8.2 Use of layout file 4.9 3.9.2 Using menu resources 50 4.1.1 Option Menu 56 4.1.2 Context Menu 57 4.1.3 Sub Menu 59 4.2 Dialog Box 61 4.3 Toast 64 4.4 Event Handling 66 4.4.1 Event Handling Mechanism 66 4.4.2 Event Listeners in Android 68 4.4.3 Event Handling Steps 69 4.5 Layout Management 72 4.5.1 Linear Layout 73 4.5.2 Frame Layout 75 4.5.3 Table Layout 76 4.5.4 Relative Layout 77 4.5.5 Absolute Layout 78 4.6 Widget 79 4.6.1 Common Widgets 79 4.6.2 AutoCompleteTextView 86 4.6.3 Tab 88 4.6.4 ProgressBar 91 4.6.5 Date and Time Selection Dialog Box (DataPickerDialog, TimePickerDialog) 95 4.6.6 ListView 97 4.6.7 GridView 99 4.6.8 Gallery View 101 4.6.9 MapView 105 4.6.10 WebView 108 Chapter 5 Android Basic Program Unit Activity 111 5.1 What is a callback 111 5.2 Introduction to Activity 113 5.2.1 Creating an Activity 113 5.2.2 Starting another Activity 115 5.2.3 Passing data between Activities 117 5.2.4 Start another Activity and return a result 121 5.3 Activity Lifecycle 126 Chapter 6 Intent, the messenger between Android components 130 6.1 Intent object and its attributes 131 6.1.1 Intent\'s ComponentName attribute 131 6.1.2 Intent\'s Action attribute 135 6.1.3 Intent\'s Data attribute 140 6.1.4 Intent\'s Category attribute 141 6.1.5 Intent\'s Extras attribute 142 6.2 System standard Activity Action applications 144 6.2.1 Standard Activity Action applications related to phone calls 145 6.2.2 Accessing the browser and map 147 6.2.3 Sending emails 149 6.3 Intent implementation strategy 151 Chapter 7 Android Service components 159 7.1 Introduction to Service 159 7.1.1 Create a Service 159 7.1.2 7.1.3 Bind an Existing Service 161 7.1.4 Service Example 161 7.2 Remote Service Call 166 7.2.1 Create an AIDL File 166 7.2.2 Implement the Java Interface Generated by the AIDL File 170 7.2.3 Expose Your Interface to the Client 171 7.2.4 Client Call 171 Chapter 8 Android Broadcast Event Processing Broadcast Receiver 173 8.1 Define Your Own Broadcast Receiver to Process Broadcast Events 173 8.2 Use System Broadcast Events 176 8.3 Use Notification and NotificationManager 178 8.3.1 Introduction to Notification and NotificationManager 178 8.3.2 Notification Example 179 8.4 Use of AlarmManager 186 Chapter 9 Data Access in Android 190 9.1 Preference 190 9.1.1 Introduction to Preference 190 9.1.2 Preference Application Example - Saving Temporary SMS 191 9.2 File 193 9.3 SQLite 195 9.3.1 SQLiteDatabase 195 9.3.2 SQLiteOpenHelper 199 9.3.3 SQLite Application Example - Collection Management 201 Chapter 10 Content Provider 208 10.1 Introduction to Content Provider 208 10.1.1 Common Methods of Content Provider 208 10.1.2 ContentResolver 209 10.1.3 URI 209 10.1.4 Query System ContentProvider Content 210 10.1.5 Add System ContentProvider Content 211 10.1.6 10.2 Customizing ContentProvider 212 10.2.1 Steps to Creating a ContentProvider 212 10.2.2 ContentProvider Instances 213 Chapter 11 Multimedia Applications in Android 221 11.1 Audio and Video Playback 221 11.1.1 Playing from a Source File 221 11.1.2 Playing from the File System 222 11.1.3 Playing from the Network 222 11.2 Mini Music Player 223 11.3 Mini Video Player 228 11.4 Recording Audio and Video 229 11.5 Camera Photography 233 Chapter 12 Graphics and Images in Android 238 12.1 Accessing Images in Android 238 12.1.1 Creating a Drawable Object Using an Image File 239 12.1.2 Defining Drawable Properties Using an XML File 240 12.1.3 Bitmap and BitmapFactory 241 12.2 Animation in Android 242 12.2.1 Tween animation 242 12.2.2 Frame animation 251 12.3 Dynamic graphics drawing 253 12.3.1 Basic ideas of dynamic graphics drawing 253 12.3.2 Introduction to dynamic graphics drawing class 256 12.3.3 Drawing geometric figures 257 12.4 Graphics effects 261 12.4.1 Using Matrix to implement rotation, scaling and translation 261 12.4.2 Using Shader class to render graphics 264 Chapter 13 Internet Applications in Android 268 13.1 Network Programming through Socket and ServerSocket 268 13.1.1 Socket and ServerSocket Programming Model 268 13.1.2 Socket Programming Example 269 13.2 Network Programming through URL 271 13.3 Network Programming through HTTP 273 13.3.1 Using HttpURLConnection 273 13.3.2 Using Apache HTTP Client 278 13.4 Network Programming through Web Services 280 13.5 Displaying Web Pages Directly Using WebView Components 285 13.5.1 Using WebView to Open Web Pages 285 13.5.2 Using WebView to Load HTML 286 Chapter 14 GPS Applications in Android 287 14.1 Introduction to LocationManager and LocationProvider 287 14.1.1 LocationManager 288 14.1.2 LocationProvider 288 14.2 Testing Location Services through the Simulator 289 14.3 Obtaining LocationProvider 292 14.3.1 Obtaining LocationProvider by Name 292 14.3.2 Obtaining the Currently Available LocationProvider 292 14.3.3 Obtaining LocationProvider Based on Criteria Conditions 292 14.4 Positioning and Tracking 293 14.4.1 Positioning 294 14.4.2 308 15.3 Detailed Design of Mobile Police Communication System 309 15.3.1 System Package and Resource Planning 309 15.3.2 Activity Interface Planning and Program Execution Flow 310 15.3.3 System Database Design 312 15.4 System Coding Implementation 313 15.4.1 Login Module Android Client Implementation 313 15.4.2 15.4.4 Implementation of Information Query Submenu 326 15.4.5 Implementation of Fugitive Query Module Client 327 15.4.6 Implementation of Fugitive Query Module Server 332 15.4.7 Implementation of Information Collection Submenu 338 15.4.8 Implementation of Motor Vehicle Violation Information Collection Android Client 339 15.4.9 Implementation of Motor Vehicle Violation Information Collection Server 345 15.4.10 Implementation of File Upload Submenu 348 15.4.11 Implementation of On-site Photo Upload Android Client 349 15.4.12 Implementation of On-site Photo Upload Server 360 15.4.13 Implementation of GPS Positioning Function Submenu 363 15.4.14 Implementation of GPS Positioning \"My Location\" 364 15.4.15 Implementation of GPS Positioning \"Query by Coordinates\" 369 15.4.16 374 Chapter 16 Android Application Case - Thunder Game 378 16.1 Basic Framework of Android Game Development 378 16.1.1 Basics of Android Game Development 378 16.1.2 Basic Framework of Android Game Development 379 16.2 Grafting Java ME Game API to Android 384 16.2.1 Migration of Layer Class 384 16.2.2 Migration of Sprite Class 386 16.2.3 Migration of TiledLayer Class 386 16.2.4 Migration of LayerManager Class 386 16.3 Implementation of Android Version of Thunder Game 387 16.3.1 Introduction to Thunder Game 387 16.3.2 Implementation of Thunder Game 387 Chapter 17 Android Application Case - Memo 396 17.1 Implementation of Memo Data Storage 396 17.1.1 Database Table Design 396 17.1.2 Memo Content Provider Implementation 397 17.2 Memo List Display 402 17.3 Memo Maintenance 405 17.4 Memo Scheduled Reminder 412 17.4.1 Define Reminder Broadcast Receiver 412 17.4.2 Display Reminder Activity 413 Chapter 18 Android Application Case - Wireless Ordering System 417 18.1 Wireless Ordering System Requirements Analysis 417 18.2 Wireless Ordering System Overview Design 417 18.2.1 System Physical Architecture 418 18.2.2 Technology Selection 418 18.2.3 System Functions 419 18.3 Wireless Ordering System Detailed Design 422 18.3.1 System Package and Resource Planning 422 18.3.2 System Database Design 423 18.4 System Coding Implementation 424 18.4.1 Login Module Android Client Implementation 424 18.4.2 Login Module Server Implementation 432 18.4.3 Program Main Menu Implementation 437 18.4.4 Ordering Function Client Implementation 440 18.4.5 Implementation of the Ordering Function on the Server Side 450 18.4.6 Implementation of the Settlement Module on the Android Client Side 455 18.4.7 Implementation of the Settlement Module on the Server Side 458 18.4.8 Implementation of the Table Checking Module on the Android Client Side 466 18.4.9 Implementation of the Table Checking Module on the Server Side 470 18.4.10 Implementation of the Update Module on the Android Client Side 473 18.4.11 Implementation of the Update Module on the Server Side 477 18.4.12 Implementation of the Table Switching Module on the Android Client Side 480 18.4.13 Implementation of the Table Switching Module on the Server Side 482 18.4.14 Implementation of the Table Merging Module on the Android Client Side 485 18.4.15 Implementation of the Table Merging Module on the Server Side 488
You Might Like
Recommended ContentMore
Open source project More
Popular Components
Searched by Users
Just Take a LookMore
Trending Downloads
Trending ArticlesMore