Android®
Fully Loaded
Rob Huddleston
Wiley Publishing, Inc.
Android® Fully Loaded
Published by:
Wiley Publishing, Inc.
111 River Street
Hoboken, NJ 07030-5774
www.wiley.com
Copyright © 2011 by Wiley Publishing, Inc.
Published by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 978-0-470-93002-1
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400, fax 978-646-8600, or on the web at www.copyright.com. Requests to the Publisher for permission should be addressed to Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions.
LIMIT OF LIABITLITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ.
For general information on our other products and services or to obtain technical support, please contact our Customer Care department within the U.S. at (800) 762-2974, outside the U.S. at (317) 572-3993 or fax (317) 572-4002.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. For more information about Wiley products, please visit our web site at www.wiley.com.
Library of Congress Control Number: 2010935567
Trademarks: Wiley, the Wiley Publishing logo, and all related trademarks, logos, and trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates. All other trademarks are the property of their respective owners. Wiley Publishing, Inc. is not associated with any product or vendor mentioned in this book.
Acknowledgments
No technical book should be trusted that does not have a good tech editor backing up the author, but in the case of this book, I can say without question that it could not even have been written without the tech editor, Phil Nickinson. Phil is the editor at AndroidCentral.com, the online resource for all things Android and a site that all readers should bookmark and visit regularly. He is a pretty busy guy, between blogging, responding to forum posts, traveling to mobile device launches, and most importantly, taking care of his family. Editing a book like this was not, I think, high on his list of things to add to his plate, but he graciously agreed to do so nonetheless. True, I suspect he only agreed because he and I are cousins, but whatever the reason, I am in his debt. So my thanks to Phil and also to Shannon for letting me monopolize more of her husband’s time and to Mia for letting me make her daddy busier. Phil also became a father again while we worked on this book. Welcome to the family, Bella.
Speaking of family, I am as always thankful to Kelley, Jessica, and Xander for their love and continued support for my writing and odd schedule. Thanks as well to my mom and dad for your support and for always being willing to hop on a plane to visit and help out with the grandkids.
The people at Wiley continue to be a wonderful group with whom to work. I’ve now had the pleasure to work with Stephanie McComb on two books, and I look forward to even more going forward. Thanks for being so kind and supportive, and for lunch. Kelly Henthorne did a great job editing, and Debbie Abshier and David Sechrist pulled everything together to produce the beautiful book you hold in your hands.
Credits
Senior Acquisitions Editor
Stephanie McComb
Editorial Director
Robyn B. Siesky
Vice President & Executive Group Publisher
Richard Swadley
Vice President & Executive Publisher
Barry Pruett
Business Manager
Amy Knies
Marketing Manager
Sandy Smith
Production Editor, Copy Editing, Layout, Design, Proofreading, and Indexing
Abshier House
Cover Image
Michael E. Trent
About the Author
Rob Huddleston has been developing Web pages and applications since 1994 and has been an instructor since 1999, teaching Web and graphic design to thousands of students. His clients have included the U.S. Bureau of Land Management, the U.S. Patent and Trademark Office, the States of California and Nevada, and many other federal, city, and county agencies; the United States Army and Air Force; Fortune 500 companies such as AT&T, Bank of America, Wells Fargo, Safeway, and Coca-Cola; software companies including Adobe, Oracle, Intuit, and Autodesk; the University of California, San Francisco State University, and the University of Southern California; and hundreds of small businesses and nonprofit agencies, both in the United States and abroad.
Rob is an adjunct professor in the Interactive Media program at the Art Institute of California, Sacramento. He is an Adobe Certified Instructor, Certified Expert, and Certified Developer, serves as an Adobe User Group Manager, and has been named as an Adobe Community Professional for his volunteer work answering user questions in online forums. He also helps users as an expert moderator on Adobe’s Community Help system. Rob lives in Northern California with his wife and two children.
Rob is the author of XML: Your visual blueprint™ for building expert websites using XML, CSS, XHTML, and XSLT; HTML, XHTML and CSS: Your visual blueprint™ for designing effective websites; Master VISUALLY: Dreamweaver CS4 and Flash CS4 Professional; ActionScript 3: Your visual blueprint™ for creating interactive projects in Flash CS4 Professional; the Adobe Flash Catalyst CS5 Bible, and Teach Yourself VISUALLY Web Design. You can visit Rob’s blog at www.robhuddleston.com or follow him on Twitter at twitter.com/robhuddles.
I have attended MAX, with a few exceptions, each year since 2005, and have noticed an interesting shift amongst the attendees during the keynote. Even two years ago, the crowd would have been lit by an almost unearthly blue glow from all of the people with open laptops. This year, however, few laptops were to be seen. This did not signal a shift away from social media use, but instead a shift in the devices being used. I would suspect that more people actually tweeted during the keynote than in the past, simply because more people use Twitter today than two years ago. The difference was that almost everyone in the theater was using a mobile phone.
MAX itself has recognized this shift: There is no question that the primary focus of the event is mobile development. A great many of the sessions focus on developing for mobile devices, and the conference’s main sponsors have shifted from Internet firms like Yahoo to mobile providers. In fact, the two biggest sponsors at MAX this year were Motorola and BlackBerry, both of whom actually gave away phones to attendees; Motorola in fact went so far as to give every person at the conference — close to 5,000 in all — a new Droid 2.
MAX is something of a microcosm, but in many ways, it really reflects a tectonic shift in the bigger world as well. Even five years ago, the term “smartphone” was still new; if you had one, you were likely to be the focus of a lot of discussion. Today, the discussion has shifted from “is that a smartphone?” to “what smartphone is that?”
Smartphones have created a massive shift in how we interact online. Today, most people visiting the top sites on the Web still use desktop and laptop computers, but that trend is quickly changing. In fact, estimates are that by 2013, smartphones actually will surpass traditional computers to become the primary means by which we get online.
Smartphone technology also has opened up a new world for developers, providing an exciting and rapidly expanding market for applications built for mobile devices, providing you, the end user, a seemingly limitless supply of apps that will increase your productivity by enabling you to check e-mail, read and edit documents, view presentations, and much more — all on your phone. At least as many apps exist to decrease your productivity as well: No shortage of games exist to allow you to kill time and drain your battery while having fun.
I assume you are buying this book because you recently bought an Android-based smartphone. You hold in your hand a miniature computer; a computer so far advanced from those that took us to the moon that it is almost unfair to label both with that same term, computer. Certainly, referring to it as a phone at all is even misleading.
In some ways, carrying a device with that kind of speed and capabilities can be a bit daunting. Hopefully, reading through this book will help strip away some of that mystery, will help you better understand your new device, and will enable you to truly leverage all that it can do.
Most of all, please enjoy your new device.