Android Wireless Application Development Volume I

Android Wireless Application Development Volume I : Android Essentials

3.37 (8 ratings by Goodreads)
By (author)  , By (author) 

Free delivery worldwide

Available. Dispatched from the UK in 4 business days
When will my order arrive?


Android Wireless Application Development has earned a reputation as the most useful real-world guide to building robust, commercial-grade Android apps. Now, authors Lauren Darcey and Shane Conder have systematically revised and updated this guide for the latest Android SDK 4.0. To accommodate their extensive new coverage, they've split the book into two volumes. Volume I focuses on Android essentials, including setting up your development environment, understanding the application lifecycle, designing effective user interfaces, developing for diverse devices, and optimizing your mobile app development process--from design through publishing. Every chapter has been thoroughly updated for the newest APIs, tools, utilities, and hardware. All sample code has been overhauled and tested on leading devices from multiple companies, and many new examples have been added. Drawing on decades of in-the-trenches experience as professional mobile developers, Darcey and Conder provide valuable new best practices--including powerful techniques for constructing more portable apps. This new edition contains full chapters on Android manifest files, content providers, effective app design, and testing; an all-new chapter on tackling compatibility issues; coverage of today's most valuable new Android tools and utilities; and even more exclusive tips and tricks. An indispensable resource for every Android development team member.
show more

Product details

  • Paperback | 600 pages
  • 175.26 x 226.06 x 33.02mm | 929.86g
  • Pearson Education (US)
  • Addison-Wesley Educational Publishers Inc
  • New Jersey, United States
  • English
  • 3rd edition
  • 0321813839
  • 9780321813831
  • 727,747

About Lauren Darcey

Lauren Darcey is responsible for the technical leadership and direction of a small software company specializing in mobile technologies, including Android, iOS, Blackberry, Palm Pre, BREW, and J2ME and consulting services. With more than two decades of experience in professional software production, Lauren is a recognized authority in application architecture and the development of commercial-grade mobile applications. Lauren received a B.S. in Computer Science from the University of California, Santa Cruz. She spends her copious free time traveling the world with her geeky mobile-minded husband and is an avid nature photographer. Her work has been published in books and newspapers around the world. In South Africa, she dove with 4-meter-long great white sharks and got stuck between a herd of rampaging hippopotami and an irritated bull elephant. She's been attacked by monkeys in Japan, gotten stuck in a ravine with two hungry lions in Kenya, gotten thirsty in Egypt, narrowly avoided a coup d'etat in Thailand, geocached her way through the Swiss Alps, drank her way through the beer halls of Germany, slept in the crumbling castles of Europe, and gotten her tongue stuck to an iceberg in Iceland (while being watched by a herd of suspicious wild reindeer). Shane Conder has extensive development experience and has focused his attention on mobile and embedded development for the past decade. He has designed and developed many commercial applications for Android, iOS, BREW, Blackberry, J2ME, Palm, and Windows Mobile--some of which have been installed on millions of phones worldwide. Shane has written extensively about the mobile industry and evaluated mobile development platforms on his tech blogs and is well-known within the blogosphere. Shane received a B.S. in Computer Science from the University of California. A self-admitted gadget freak, Shane always has the latest smartphone, tablet, or other mobile device. He can often be found fiddling with the latest technologies, such as cloud services and mobile platforms, and other exciting, state-of-the-art technologies that activate the creative part of his brain. He also enjoys traveling the world with his geeky wife, even if she did make him dive with 4-meter-long great white sharks and almost get eaten by a lion in Kenya. He admits that he has to take at least two phones with him when backpacking--even though there is no coverage--and that he snickered and whipped out his Android phone to take a picture when Laurie got her tongue stuck to that iceberg in Iceland, and that he is catching on that he should be writing his own bio. Darcey and Conder coauthored Sams Teach Yourself Android Application Development in 24 Hours.
show more

Back cover copy

The start-to-finish guide to the essentials of Android development: Updated for Android 4.0+ "Android Wireless Application Development" " "has earned a reputation as the most useful real-world guide to building robust, commercial-grade Android apps. Now, the authors have systematically revised and updated this guide for the latest Android 4.0 SDK. To accommodate their extensive new coverage, they ve split the book into two volumes. Volume I focuses on Android essentials, including setting up your development environment, understanding the application lifecycle, designing effective user interfaces, developing for diverse devices, and optimizing your mobile app development process--from design through publication. Drawing on decades of in-the-trenches experience as professional mobile developers, Lauren Darcey and Shane Conder provide valuable tips and best practices--including powerful techniques for constructing more portable apps. Every chapter of this edition has been thoroughly updated for the newest APIs, tools, utilities, and hardware. This new edition contains Updates to all existing chapters, including many new topics Full chapters on Android manifest files, content providers, effective app design, and testing New coverage of working with fragments and other recent user interface enhancements An all-new chapter on tackling compatibility issues Expert coverage of today s most valuable Android tools and utilities Coverage of little-known SDK features that offer surprising power Even more sample code projects This book, and its companion, Volume II, are indispensable resources for Android development team members: software developers with all levels of mobile experience, team leaders and project managers, testers and QA specialists, software architects, and even marketers. Available this summer: "Android Wireless Application Development Volume II: Advanced Topics "(ISBN: 9780321813848) "
show more

Table of contents

Introduction 1 Who Should Read This Book 1Key Questions Answered in This Volume 2How These Books Are Structured 2An Overview of Changes in This Edition 4Development Environment Used in This Book 5Supplementary Materials Available 6Where to Find More Information 6Conventions Used in This Book 7Contacting the Authors 8 PART I: AN OVERVIEW OF THE ANDROID PLATFORM Chapter 1 Introducing Android 11A Brief History of Mobile Software Development 11 Way Back When 11 "The Brick" 13 Wireless Application Protocol (WAP) 15 Proprietary Mobile Platforms 17The Open Handset Alliance 19 Google Goes Wireless 19 Forming the Open Handset Alliance 19 Manufacturers: Designing Android Devices 20 Mobile Operators: Delivering the Android Experience 21 Apps Drive Device Sales: Developing Android Applications 22 Taking Advantage of All Android Has to Offer 22 The Android Marketplace: Where We're at Now 22Android Platform Differences 23 Android: A Next-Generation Platform 24 Free and Open Source 25 Familiar and Inexpensive Development Tools 25 Reasonable Learning Curve for Developers 26 Enabling Development of Powerful Applications 26 Rich, Secure Application Integration 26 No Costly Obstacles to Publication 27 A "Free Market" for Applications 27 A Growing Platform 28The Android Platform 29 Android's Underlying Architecture 29 Security and Permissions 31 Developing Android Applications 32Summary 35 References and More Information 35 Chapter 2 Setting Up Your Android Development Environment 37Configuring Your Development Environment 37 Configuring Your Operating System for Device Debugging 39 Configuring Your Android Hardware for Debugging 39 Upgrading the Android SDK 41 Problems with the Android Software Development Kit 41Exploring the Android SDK 42 Understanding the Android SDK License Agreement 42 Reading the Android SDK Documentation 43 Exploring the Core Android Application Framework 43 Exploring the Core Android Tools 46 Exploring the Android Sample Applications 50Summary 52 References and More Information 52 Chapter 3 Writing Your First Android Application 53Testing Your Development Environment 53 Adding the Snake Project to Your Eclipse Workspace 54 Creating an Android Virtual Device (AVD) for Your Snake Project 56 Creating a Launch Configuration for Your Snake Project 58 Running the Snake Application in the Android Emulator 59Building Your First Android Application 62 Creating and Configuring a New Android Project 62 Core Files and Directories of the Android Application 65 Creating an AVD for Your Project 65 Creating a Launch Configuration for Your Project 66 Running Your Android Application in the Emulator 67 Debugging Your Android Application in the Emulator 69 Adding Logging Support to Your Android Application 73 Adding Some Media Support to Your Application 74 Debugging Your Application on the Hardware 78Summary 80 References and More Information 81 Chapter 4 Mastering the Android Development Tools 83Using the Android Documentation 83Leveraging the Android Emulator 85Viewing Application Log Data with LogCat 86Debugging Applications with DDMS 87Using Android Debug Bridge (ADB) 87Using the Resource Editors and UI Designer 88Using the Android Hierarchy Viewer 91 Launching the Hierarchy Viewer 92 Working in Layout View Mode 92 Optimizing Your User Interface 94 Working in Pixel Perfect Mode 94Working with Nine-Patch Stretchable Graphics 95Working with Other Android Tools 98Summary 99 References and More Information 100 PART II: ANDROID APPLICATION BASICS Chapter 5 Understanding the Anatomy of an Android Application 103Mastering Important Android Terminology 103Using the Application Context 104 Retrieving the Application Context 104 Using the Application Context 104Performing Application Tasks with Activities 106 The Lifecycle of an Android Activity 106Organizing Activity Components with Fragments 111Managing Activity Transitions with Intents 113 Transitioning Between Activities with Intents 113 Organizing Application Navigation with Activities and Intents 115Working with Services 116Receiving and Broadcasting Intents 117Summary 117 References and More Information 118 Chapter 6 Defining Your Application Using the Android Manifest File 119Configuring Android Applications Using the Android Manifest File 119 Editing the Android Manifest File 120Managing Your Application's Identity 124 Versioning Your Application 125 Setting the Application Name and Icon 125Enforcing Application System Requirements 125 Targeting Specific SDK Versions 126 Enforcing Application Platform Requirements 129 Working with External Libraries 130 Other Application Configuration Settings and Filters 131Registering Activities in the Android Manifest 131 Designating a Primary Entry Point Activity for Your Application Using an Intent Filter 132 Configuring Other Intent Filters 132 Registering Other Application Components 133Working with Permissions 133 Registering Permissions Your Application Requires 133 Registering Permissions Your Application Enforces 134Exploring Other Manifest File Settings 135Summary 136 References and More Information 136 Chapter 7 Managing Application Resources 137What Are Resources? 137 Storing Application Resources 137 Resource Value Types 138 Accessing Resources Programmatically 142Setting Simple Resource Values Using Eclipse 143 Working with Different Types of Resources 146 Working with String Resources 146 Using String Resources as Format Strings 147 Working with String Arrays 149 Working with Boolean Resources 149 Working with Integer Resources 150 Working with Colors 151 Working with Dimensions 152 Working with Simple Drawables 153 Working with Images 154 Working with Animation 156 Working with Menus 158 Working with XML Files 159 Working with Raw Files 160 References to Resources 161Working with Layouts 162Referencing System Resources 167Summary 168 References and More Information 168 PART III: ANDROID USER INTERFACE DESIGN ESSENTIALS Chapter 8 Exploring User Interface Screen Elements 171Introducing Android Views and Layouts 171 Introducing the Android View 171 Introducing the Android Controls 171 Introducing the Android Layout 172Displaying Text to Users with TextView 173 Configuring Layout and Sizing 173 Creating Contextual Links in Text 174Retrieving Data from Users with EditText 176 Retrieving Text Input Using EditText Controls 176 Constraining User Input with Input Filters 178Helping the User with Autocompletion 179Giving Users Choices Using Spinner Controls 181Allowing Simple User Selections with Buttons, Check Boxes, Switches, and Radio Groups 183 Using Basic Buttons 184 Using CheckBox and ToggleButton Controls 186 Using RadioGroup and RadioButton 187Retrieving Dates and Times from Users 190Using Indicators to Display Data to Users 191 Indicating Progress with ProgressBar 192 Adjusting Progress with SeekBar 194 Displaying Rating Data with RatingBar 194 Showing Time Passage with the Chronometer 195 Displaying the Time 196Summary 197 References and More Information 198 Chapter 9 Designing User Interfaces with Layouts 199Creating User Interfaces in Android 199 Creating Layouts Using XML Resources 199 Creating Layouts Programmatically 201Organizing Your User Interface 203 Using ViewGroup Subclasses for Layout Design 204 Using ViewGroup Subclasses as View Containers 204Using Built-in Layout Classes 205 Using FrameLayout 207 Using LinearLayout 209 Using RelativeLayout 211 Using TableLayout 214 Using GridLayout 216 Using Multiple Layouts on a Screen 220Using Container Control Classes 220 Using Data-Driven Containers 221 Organizing Screens with Tabs 226 Adding Scrolling Support 229 Exploring Other View Containers 230Summary 231 References and More Information 231 Chapter 10 Working with Fragments 233Understanding Fragments 233 Understanding the Fragment Lifecycle 234 Working with Special Types of Fragments 237 Designing Fragment-Based Applications 238Using the Android Support Package 247 Adding Fragment Support to Legacy Applications 247 Using Fragments in New Applications Targeting Older Platforms 248 Linking the Android Support Package to Your Project 248Summary 249 References and More Information 250 Chapter 11 Working with Dialogs 251Choosing Your Dialog Implementation 251Exploring the Different Types of Dialogs 252Working with Dialogs: The Legacy Method 253 Tracing the Lifecycle of a Dialog 254 Working with Custom Dialogs 256Working with Dialogs: The Fragment Method 257Summary 260 References and More Information 260 PART IV: ANDROID APPLICATION DESIGN ESSENTIALS Chapter 12 Using Android Preferences 263Working with Application Preferences 263 Determining When Preferences Are Appropriate 263 Storing Different Types of Preference Values 264 Creating Private Preferences for Use by a Single Activity 264 Creating Shared Preferences for Use by Multiple Activities 265 Searching and Reading Preferences 265 Adding, Updating, and Deleting Preferences 266 Reacting to Preference Changes 267 Finding Preferences Data on the Android File System 267Creating Manageable User Preferences 268 Creating a Preference Resource File 269 Using the PreferenceActivity Class 270Summary 273 References and More Information 273 Chapter 13 Working with Files and Directories 275Working with Application Data on the Device 275Practicing Good File Management 276Understanding Android File Permissions 277Working with Files and Directories 277 Exploring with the Android Application Directories 278 Working with Other Directories and Files on the Android File System 282Summary 284 References and More Information 284 Chapter 14 Using Content Providers 285Exploring Android's Content Providers 285 Using the MediaStore Content Provider 286 Using the CallLog Content Provider 288 Using the Browser Content Provider 289 Using the CalendarContract Content Provider 291 Using the UserDictionary Content Provider 291 Using the VoicemailContract Content Provider 291 Using the Settings Content Provider 292 Using the Contacts Content Providers 292Modifying Content Providers Data 297 Adding Records 297 Updating Records 298 Deleting Records 298Using Third-Party Content Providers 299Summary 300 References and More Information 300 Chapter 15 Designing Compatible Applications 301Maximizing Application Compatibility 301Designing User Interfaces for Compatibility 303 Working with Fragments 305 Leveraging the Android Support Package 305 Supporting Specific Screen Types 305 Working with Nine-Patch Stretchable Graphics 306 Using the Working Square Principle 306Providing Alternative Application Resources 308 Understanding How Resources Are Resolved 308 Organizing Alternative Resources with Qualifiers 309 Providing Resources for Different Orientations 316 Using Alternative Resources Programmatically 316 Organizing Application Resources Efficiently 316Targeting Tablets, TVs, and Other New Devices 318 Targeting Tablet Devices 318 Targeting Google TV Devices 319Summary 321 References and More Information 321 PART V: PUBLISHING AND DISTRIBUTING ANDROID APPLICATIONS Chapter 16 The Android Software Development Process 325An Overview of the Mobile Development Process 325Choosing a Software Methodology 326 Understanding the Dangers of Waterfall Approaches 326 Understanding the Value of Iteration 327Gathering Application Requirements 327 Determining Project Requirements 327 Developing Use Cases for Mobile Applications 329 Incorporating Third-Party Requirements 330 Managing a Device Database 330Assessing Project Risks 333 Identifying Target Devices 333 Acquiring Target Devices 335 Determining the Feasibility of Application Requirements 336 Understanding Quality Assurance Risks 336Writing Essential Project Documentation 337 Developing Test Plans for Quality Assurance Purposes 338 Providing Documentation Required by Third Parties 338 Providing Documentation for Maintenance and Porting 338Leveraging Configuration Management Systems 339 Choosing a Source Control System 339 Implementing an Application Version System That Works 339Designing Mobile Applications 340 Understanding Mobile Device Limitations 340 Exploring Common Mobile Application Architectures 340 Designing for Extensibility and Maintenance 341 Designing for Application Interoperability 342Developing Mobile Applications 342Testing Mobile Applications 343Deploying Mobile Applications 343 Determining Target Markets 344Supporting and Maintaining Mobile Applications 344 Track and Address Crashes Reported by Users 345 Testing Firmware Upgrades 345 Maintaining Adequate Application Documentation 345 Managing Live Server Changes 345 Identifying Low-Risk Porting Opportunities 345Summary 346 References and More Information 346 Chapter 17 Designing and Developing Bulletproof Android Applications 347Best Practices in Designing Bulletproof Mobile Applications 347 Meeting Mobile Users' Demands 348 Designing User Interfaces for Mobile Devices 348 Designing Stable and Responsive Mobile Applications 349 Designing Secure Mobile Applications 351 Designing Mobile Applications for Maximum Profit 351 Leveraging Third-Party Quality Standards 352 Designing Mobile Applications for Ease of Maintenance and Upgrades 353 Leveraging Android Tools for Application Design 354Avoiding Silly Mistakes in Android Application Design 355Best Practices in Developing Bulletproof Mobile Applications 355 Designing a Development Process That Works for Mobile Development 356 Testing the Feasibility of Your Application Early and Often 356 Using Coding Standards, Reviews, and Unit Tests to Improve Code Quality 357 Handling Defects Occurring on a Single Device 359 Leveraging Android Tools for Development 360 Avoiding Silly Mistakes in Android Application Development 360Summary 361 References and More Information 361 Chapter 18 Testing Android Applications 363Best Practices in Testing Mobile Applications 363 Designing a Mobile Application Defect Tracking System 363 Managing the Testing Environment 365 Maximizing Testing Coverage 367 Leveraging Android Tools for Android Application Testing 374 Avoiding Silly Mistakes in Android Application Testing 375Summary 376 References and More Information 376 Chapter 19 Publishing Your Android Application 377Choosing the Right Distribution Model 377 Protecting Your Intellectual Property 378 Billing the User 379Packaging Your Application for Publication 380 Preparing Your Code for Packaging 380 Packing and Signing Your Application 382 Testing the Release Version of Your Application Package 384 Distributing Your Application 385Publishing on the Android Market 385 Signing Up for a Developer Account on the Android Market 385 Uploading Your Application to the Android Market 387 Uploading Application Marketing Assets 388 Configuring Application Listing Details 388 Configuring Application Publishing Options 390 Configuring Application Contact and Consent Information 390 Publishing Your Application on the Android Market 392 Managing Your Application on the Android Market 392Publishing Using Other Alternatives 393Self-Publishing Your Application 394Summary 395 References and More Information 395 PART VI: APPENDIXESAppendix A The Android Emulator Quick-Start Guide 399Simulating Reality: The Emulator's Purpose 399Working with Android Virtual Devices (AVDs) 401 Using the Android Virtual Device Manager 402 Creating an AVD 403Launching the Emulator with a Specific AVD 407 Maintaining Emulator Performance 407 Configuring Emulator Startup Options 408 Launching an Emulator to Run an Application 408 Launching an Emulator from the Android Virtual Device Manager 410Configuring the GPS Location of the Emulator 411Calling Between Two Emulator Instances 413Messaging between Two Emulator Instances 415Interacting with the Emulator through the Console 416 Using the Console to Simulate Incoming Calls 416 Using the Console to Simulate SMS Messages 416 Using the Console to Send GPS Coordinates 418 Using the Console to Monitor Network Status 418 Using the Console to Manipulate Power Settings 418 Using Other Console Commands 419Enjoying the Emulator 419Understanding Emulator Limitations 420 References and More Information 421 Appendix B The Android DDMS Quick-Start Guide 423Using DDMS with Eclipse and as a Standalone Application 423Getting Up to Speed Using Key Features of DDMS 424Working with Processes, Threads, and the Heap 425 Attaching a Debugger to an Android Application 425 Stopping a Process 426 Monitoring Thread Activity of an Android Application 426 Monitoring Heap Activity 427 Prompting Garbage Collection 428 Creating and Using an HPROF File 429Using the Allocation Tracker 430Working with the File Explorer 430 Browsing the File System of an Emulator or Device 432 Copying Files from the Emulator or Device 432 Copying Files to the Emulator or Device 433 Deleting Files on the Emulator or Device 433Working with the Emulator Control 434 Simulating Incoming Voice Calls 434 Simulating Incoming SMS Messages 434 Sending a Location Fix 435Taking Screen Captures of the Emulator and Device Screens 435Working with Application Logging 436 Appendix C Eclipse IDE Tips and Tricks 439Organizing Your Eclipse Workspace 439 Integrating with Source Control Services 439 Repositioning Tabs within Perspectives 440 Maximizing Windows 440 Minimizing Windows 440 Viewing Windows, Side by Side 440 Viewing Two Sections of the Same File 441 Closing Unwanted Tabs 441 Keeping Windows Under Control 441 Creating Custom Log Filters 441 Searching Your Project 442 Organizing Eclipse Tasks 442Writing Code in Java 443 Using Autocomplete 443 Creating New Classes and Methods 443 Organizing Imports 443Formatting Code 444Renaming Almost Anything 444Refactoring Code 444Reorganizing Code 446Using QuickFix 446Providing Javadoc-Style Documentation 446Resolving Mysterious Build Errors 447 Index 449
show more

Rating details

8 ratings
3.37 out of 5 stars
5 25% (2)
4 12% (1)
3 50% (4)
2 0% (0)
1 12% (1)
Book ratings by Goodreads
Goodreads is the world's largest site for readers with over 50 million reviews. We're featuring millions of their reader ratings on our book pages to help you find your new favourite book. Close X