Android Apps with App Inventor

 Android Apps with App Inventor

This page intentionally left blank

Android Apps with App Inventor

The Fast and Easy Way to Build Android Apps

J?rg H. Kloss

Upper Saddle River, NJ ? Boston ? Indianapolis ? San Francisco New York ? Toronto ? Montreal ? London ? Munich ? Paris ? Madrid

Capetown ? 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.

The author 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.

The 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 corpsales@

For sales outside the United States please contact:

International Sales international@

Visit us on the Web: aw

Library of Congress Cataloging-in-Publication Data

Kloss, J?rg H. Android Apps with App inventor : the fast and easy way to build android apps / J?rg

H. Kloss. p. cm.

Includes bibliographical references and index. ISBN 978-0-321-81270-4 (pbk. : alk. paper) 1. Application software--Development. 2. Android (Electronic resource) 3. Open source software. 4. Smartphones. 5. Mobile computing. I. Title. QA76.76.A65K614 2012 005.3--dc23

2011047948

Copyright ? 2012 Pearson Education, Inc.

All rights reserved. Printed in the United States of America. This publication is protected by copyright, 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. To obtain permission to use material from this work, please submit a written request to Pearson Education, Inc., Permissions Department, One Lake Street, Upper Saddle River, New Jersey 07458, or you may fax your request to (201) 236-3290.

LEGO and MINDSTORMS are registered trademarks of the LEGO Group.

ISBN-13: 978-0-321-81270-4 ISBN-10: 0-321-81270-0 Text printed in the United States on recycled paper at Edwards Brothers Malloy in Ann Arbor, Michigan. Second printing, September 2012

Editor-in-Chief Mark Taub

Acquisitions Editor Trina MacDonald

Development Editor Songlin Qiu

Managing Editor John Fuller

Project Editor Anna Popick

Copy Editor Jill Hobbs

Indexer Jack Lewis

Proofreader Lori Newhouse

Publishing Coordinator Olivia Basegio

Cover Designer Chuti Prasertsith

Compositor Vicki Rowland

Translator Almut Dworak

Contents at a Glance

Preface by Hal Abelson xv Preface xvii Acknowledgments xxi About the Author xxiii Introduction 1

I: Preparing Your First App 13 1 Preparation and Installation 15 2 The Development Environment 39 3 Developing Your First App 81

II: Easy Projects as a Warm-Up 131 4 Basic Terms and Central Concepts 133 5 The AI References 139 6 Graphical User Interface 147 7 Multimedia 175 8 Example Project: Creating a Media Center 211

III: On the Way to Becoming an App Developer 221 9 Program Development Basics 223

10 Storage and Databases 305

IV: Developing Attractive Apps 327 11 Graphics and Animation 329 12 Sensors 375 13 Communication 433

vi

Contents at a Glance

V: Useful Things for the Developer 511 14 Special Functional Areas 513 15 Tips and Tools 527

A Additional Resources 541

Index545

Contents

Preface by Hal Abelson xv

Prefacexvii

Acknowledgmentsxxi

About the Author xxiii

Introduction1 Structure and Overview 2

Part I: Preparing Your First App 2 Part II: Easy Projects as a Warm-Up 2 Part III: On the Way to Becoming an App

Developer3 Part IV: Developing Attractive Apps 3 Part V: Useful Things for the Developer 4 Companion Website 5 Requirements5 Histor y6 App Inventor at Google 6 Open Source and App Inventor at MIT 9

I: Preparing Your First App 13

1 Preparation and Installation 15 System Requirements 17 Computer Platform 17 Android Platform 19 Java Configuration 23 Login Data for App Inventor 27 Installation of the App Inventor Setup Software 29 Android Device Settings 33

2 The Development Environment 39 Welcome to App Inventor! 40 App Inventor Designer 41 Creating a Project in the Design Area 42 Five Panels 44 Inventory of Palette Components 45

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download