The Android Developers Cookbook

Building Applications with the Android SDK

James Steele Nelson To


Upper Saddle River, NJ • Boston • Indianapolis • San Francisco New York • Toronto • Montreal • London • Munich • Paris • Madrid Cape Town • Sydney • Tokyo • Singapore • Mexico City

Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals.

I"he authors and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein.

I"he publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may include electronic versions and/or custom covers and content particular to your business, training goals, marketing focus, and branding interests. For more information, please contact:

U.S. Corporate and Government Sales (800) 382-3419

[email protected]

For sales outside the United States, please contact:

International Sales [email protected]

Visit us on the Web:

Library of Congress Cataloging-in-Publication Data

Steele, James, 1971-

The Android developer's cookbook : building applications with the Android SDK / James Steele, Nelson To. p. cm.

Includes bibliographical references and index. ISBN-13: 978-0-321-74123-3 (pbk. : alk. paper) ISBN-10: 0-321-74123-4 (pbk. : alk. paper) 1. Application software—Development. 2. Android (Electronic resource) 3. Mobile computing. 4. Smartphones—Programming. 5. Operating systems ^Computers) I. To, Nelson, 1976- II. Title. QA76.76.A65S743 2011 004.1675—dc22


Copyright © 2011 by Pearson Education, Inc.

All rights reserved. Printed in the United States of America. This publication is protected by opyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding permissions, write to:

Pearson Education, Inc. Rights and Contracts Department 501 Boylston Street, Suite 900 Boston, MA 02116 Fax (617) 671-3447

mages that appear with the link in the credit line are exact reproductions or modifications of work created and shared by the Android Open Source Project ( and are used according to terms described in the Creative Commons 2.5 Attribution License ( icenses/by/2.5/).

fext printed in the United States on recycled paper at RR Donnelley, Crawfordsville, Indiana. First Printing: October 2010


Mark Taub

Acquisitions Editor

Trina McDonald

Development Editor

Michael Thurston

Managing Editor

Sandra Schroeder

Project Editor Mandie Frank

Copy Editor Deadline Driven Publishing


Erika Millen

Proofreader Jovana Shirley

Technical Editors Romin Irani Douglas Jones

Publishing Coordinator

Olivia Basegio


Gary Adair

Page Layout

Mark Shirar

ISBN-10: 0-321-74123-4 ISBN-13: 978-0-321-74123-3

To Wei with love. Jim

To my dear mom.

Character Building Thought Power

Character Building Thought Power

Character-Building Thought Power by Ralph Waldo Trine. Ralph draws a distinct line between bad and good habits. In this book, every effort is made by the writer to explain what comprises good habits and why every one needs it early in life. It draws the conclusion that habits nurtured in early life concretize into impulses in future for the good or bad of the subject.

Get My Free Ebook

Post a comment