文件名称:
Professional Android App
开发工具:
文件大小: 5mb
下载次数: 0
上传时间: 2009-11-18
详细说明: Hello, Android Chapter 1: 1 A Little Background 2 The Not So Distant Past 2 The Future 3 What It Isn’t 3 An Open Platform for Mobile Development 4 Native Android Applications 4 Android SDK Features 5 Access to Hardware including Camera, GPS, and Accelerometer 6 Native Google Maps, Geocoding, and Location-Based Services 6 Background Services 6 SQLite Database for Data Storage and Retrieval 7 Shared Data and Interapplication Communication 7 P2P Services with Google Talk 7 Extensive Media Support and 2D/3D Graphics 8 Optimized Memory and Process Management 8 Introducing the Open Handset Alliance 8 What Does Android Run On? 9 Why Develop for Android? 9 What Will Drive Android Adoption? 10 What Does It Have That Others Don’t? 10 Changing the Mobile Development Landscape 11 Introducing the Development Framework 11 What Comes in the Box 12 Understanding the Android Software Stack 12 The Dalvik Virtual Machine 14 Android Application Architecture 14 Android Libraries 15 Advanced Android Libraries 16 Summary 17 44712ftoc.indd ix44712ftoc.indd ix10/21/08 12:07:15 AM10/21/08 12:07:15 AMx Contents Getting Started 1Chapter 2: 9 Developing for Android 20 What You Need to Begin 20 Creating Your First Android Activity 24 Types of Android Applications 29 Developing for Mobile Devices 30 Hardware-Imposed Design Considerations 30 Considering the Users’ Environment 33 Developing for Android 34 To-Do List Example 37 Android Development Tools 42 The Android Emulator 42 Dalvik Debug Monitor Service (DDMS) 43 The Android Debug Bridge (ADB) 43 Summary 44 Creating Applications and Activities 4Chapter 3: 5 What Makes an Android Application? 46 Introducing the Application Manifest 46 Using the Manifest Editor 49 The Android Application Life Cycle 50 Understanding Application Priority and Process States 51 Externalizing Resources 52 Creating Resources 53 Using Resources 59 To-Do List Resources Example 62 Creating Resources for Different Languages and Hardware 63 Runtime Con? guration Changes 64 A Closer Look at Android Activities 66 Creating an Activity 66 The Activity Life Cycle 68 Android Activity Classes 73 Summary 73 Creating User Interfaces 7Chapter 4: 5 Fundamental Android UI Design 76 Introducing Views 76 Creating Activity User Interfaces with Views 77 The Android Widget Toolbox 78 44712ftoc.indd x44712ftoc.indd x10/21/08 12:07:15 AM10/21/08 12:07:15 AMxi Contents Introducing Layouts 79 Using Layouts 79 Creating New Views 80 Modifying Existing Views 81 Creating Compound Controls 85 Creating Custom Widgets and Controls 88 Using Custom Controls 98 Creating and Using Menus 99 Introducing the Android Menu System 99 De? ning an Activity Menu 101 Dynamically Updating Menu Items 104 Handling Menu Selections 104 Submenus and Context Menus 105 To-Do List Example Continued 107 Summary 112 Intents, Broadcast Receivers, Adapters, and the Internet 11Chapter 5: 3 Introducing Intents 114 Using Intents to Launch Activities 114 Using Intent Filters to Service Implicit Intents 121 Using Intent Filters for Plug-ins and Extensibility 130 Using Intents to Broadcast Events 132 Introducing Adapters 136 Introducing Some Android-Supplied Adapters 136 Using Adapters for Data Binding 136 Using Internet Resources 141 Connecting to an Internet Resource 142 Leveraging Internet Resources 143 Introducing Dialogs 143 Introducing the Dialog Class 144 Using Activities as Dialogs 147 Creating an Earthquake Viewer 148 Summary 157 Data Storage, Retrieval, and Sharing 15Chapter 6: 9 Android Techniques for Saving Data 160 Saving Simple Application Data 160 Creating and Saving Preferences 161 Retrieving Shared Preferences 161 Saving the Activity State 162 Creating a Preferences Page for the Earthquake Viewer 165 44712ftoc.indd xi44712ftoc.indd xi10/21/08 12:07:15 AM10/21/08 12:07:15 AMxii Contents Saving and Loading Files 174 Including Static Files as Resources 174 File Management Tools 175 Databases in Android 175 Introducing SQLite 176 Cursors and Content Values 176 Working with Android Databases 177 Introducing Content Providers 189 Using Content Providers 189 Native Android Content Providers 192 Creating a New Content Provider 194 Creating and Using an Earthquake Content Provider 197 Summary 205 Maps, Geocoding, and Location-Based Services 20Chapter 7: 7 Using Location-Based Services 208 Setting up the Emulator with Test Providers 208 Updating Locations in Emulator Location Providers 208 Create an Application to Manage Test Location Providers 209 Selecting a Location Provider 212 Finding the Available Providers 212 Finding Providers Based on Requirement Criteria 212 Finding Your Location 213 “Where Am I?” Example 214 Tracking Movement 216 Updating Your Location in “Where Am I?” 217 Using Proximity Alerts 219 Using the Geocoder 220 Reverse Geocoding 221 Forward Geocoding 221 Geocoding “Where Am I?” 222 Creating Map-Based Activities 224 Introducing MapView and MapActivity 224 Creating a Map-Based Activity 224 Con? guring and Using Map Views 226 Using the Map Controller 227 Mapping “Where Am I?” 228 Creating and Using Overlays 231 Introducing MyLocationOverlay 239 Introducing ItemizedOverlays and OverlayItems 239 Pinning Views to the Map and Map Positions 240 44712ftoc.indd xii44712ftoc.indd xii10/21/08 12:07:15 AM10/21/08 12:07:15 AMxiii Contents Mapping Earthquakes Example 242 Summary 247 Working in the Background 24Chapter 8: 9 Introducing Services 250 Creating and Controlling Services 250 Binding Activities to Services 258 Using Background Worker Threads 259 Creating New Threads 260 Synchronizing Threads for GUI Operations 260 Moving the Earthquake Service to a Background Thread 261 Let’s Make a Toast 262 Customizing Toasts 263 Using Toasts in Worker Threads 264 Introducing Noti? cations 265 Introducing the Noti? cation Manager 266 Creating Noti? cations 266 Triggering Noti? cations 267 Adding Noti? cations to the Earthquake Monitor 267 Advanced Noti? cation Techniques 270 Ongoing and Insistent Noti? cations 272 Using Alarms 273 Using Alarms to Update Earthquakes 274 Summary 276 Peer-to-Peer Communication 27Chapter 9: 9 Introducing Android Instant Messaging 280 Using the GTalk Service 280 Binding to the GTalk Service 281 Making a GTalk Connection and Starting an IM Session 282 Introducing Presence and the Contact Roster 283 Managing Chat Sessions 286 Sending and Receiving Data Messages 289 Introducing SMS 291 Using SMS in Your Application 291 Sending SMS Messages 292 Listening for SMS Messages 294 Emergency Responder SMS Example 297 Automating the Emergency Responder 306 Summary 314 44712ftoc.indd xiii44712ftoc.indd xiii10/21/08 12:07:15 AM10/21/08 12:07:15 AMxiv Contents Accessing Android Hardware 31Chapter 10: 5 Using the Media APIs 316 Playing Media Resources 316 Recording Multimedia 317 Using the Camera 319 Controlling Camera Settings 319 Using the Camera Preview 320 Taking a Picture 320 Introducing the Sensor Manager 321 Using the Accelerometer and Compass 323 Introducing Accelerometers 324 Detecting Acceleration Changes 324 Creating a Speedometer 326 Determining Your Orientation 329 Creating a Compass and Arti? cial Horizon 330 Android Telephony 333 Making Phone Calls 334 Monitoring Phone State and Phone Activity 334 Monitoring Data Connectivity and Activity 337 Accessing Phone Properties and Status 338 Controlling the Phone 338 Using Bluetooth 339 Introducing the Bluetooth Service 339 Controlling the Local Bluetooth Device 340 Discovering and Bonding with Bluetooth Devices 340 Managing Bluetooth Connections 342 Communication with Bluetooth 342 Using a Bluetooth Headset 344 Managing Network and Wi-Fi Connections 345 Monitoring and Managing Your Internet Connectivity 345 Managing Active Connections 346 Managing Your Wi-Fi 347 Controlling Device Vibration 350 Summary 351 Advanced Android Development 35Chapter 11: 3 Paranoid Android 354 Linux Kernel Security 354 Introducing Permissions 354 Declaring and Enforcing Permissions 355 Enforcing Permissions with Broadcasting Intents 355 44712ftoc.indd xiv44712ftoc.indd xiv10/21/08 12:07:15 AM10/21/08 12:07:15 AMxv Contents Using AIDL to Support IPC for Services 356 Implementing an AIDL Interface 356 Using Internet Services 361 Building Rich User Interfaces 361 Working with Animations 361 Using Themes to Skin Your Applications 372 Advanced Canvas Drawing 373 Introducing SurfaceView 390 Creating Interactive Controls 393 Summary 398 ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.