App Inventor Create Your Own Android Apps



Similar documents
App Inventor. Create Your Own Android Apps

Programming Flash Communication Server

Windows PowerShell Cookbook

Ladybug Chase. What You ll Build. What You ll Learn

CHAPTER 11 Broadcast Hub

Working with Databases

JAVA. EXAMPLES IN A NUTSHELL. O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo. Third Edition.

Hadoop: The Definitive Guide

CHAPTER 11 Broadcast Hub

Mobile App Design Tool for Smartphones: A Tutorial

CHAPTER 14 Understanding an App s Architecture

JavaScript Patterns. Stoyan Stefanov. O'REILLY' Beijing Cambridge Farnham Koln Sebastopol Tokyo

sendmail Cookbook Craig Hunt O'REILLY' Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo

Xylophone. What You ll Build

Oracle PL/SQL Programming

Table of Contents. Adding Build Targets to the SDK 8 The Android Developer Tools (ADT) Plug-in for Eclipse 9

Jenkins: The Definitive Guide

How To Write A Nosql Database In Spring Data Project

App Inventor Tutorial 4 Cat & Mouse Game

Programming 3D Applications with HTML5 and WebGL

Learning ios Programming

Managing Data in Motion

Web Security Testing Cookbook*

Creating Animated Apps

Automating System Administration with Perl

C# Cookbook. Stephen Teilhet andjay Hilyard. O'REILLY 8 Beijing Cambridge Farnham Köln Paris Sebastopol Taipei Tokyo '"J""'

Practical Android Projects Lucas Jordan Pieter Greyling

Beginning Nokia Apps. Development. Qt and HTIVIL5 for Symbian and MeeGo. Ray Rischpater. Apress. Daniel Zucker

What You ll Build. CHAPTER 3 MoleMash

Hadoop: The Definitive Guide

Backup and Recovery. W. Curtis Preston O'REILLY' Beijing Cambridge Farnham Köln Paris Sebastopol Taipei Tokyo

Beginning Facebook. Development. Game Apps. Wayne Graham. Apress*

JAVA ENTERPRISE IN A NUTSHELL. Jim Farley and William Crawford. O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo.

Web Security, Privacy, and Commerce

Data Algorithms. Mahmoud Parsian. Tokyo O'REILLY. Beijing. Boston Farnham Sebastopol

MIT App Inventor Getting Started Guide

Learning Web App Development

Java Power Tools. John Ferguson Smart. ULB Darmstadt 1 PI. O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo

ANDROID SECURITY ATTACKS AND DEFENSES ABHISHEK DUBEY I ANMOL MISRA. ( r öc) CRC Press VV J Taylor & Francis Group ^ "^ Boca Raton London New York

Microsoft Windows PowerShell v2 For Administrators

Rapid Application Development

WINDOWS SERVER HACKS. HLuHB Darmstadt. O'REILLY 5 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo

Scientific m-learning. 4-7 June Mobile Application Development using App Inventor for Android Devices

Rails Cookbook. Rob Orsini. O'REILLY 8 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo

Windows Vista The Definitive Guide

This chapter introduces the following App Inventor components and concepts:

Developer's Cookbook. Building Applications with. The Android. the Android SDK. A Addison-Wesley. James Steele Nelson To

Cloud Architecture Patterns

Mobile App Development Using App Inventor

Presidents Quiz. What You ll Learn

Business Architecture

CHAPTER 4 No Texting While Driving

Beijing Cambridge Farnham Köln Sebastopol Tokyo

Programming Social Applications

C#5.0 IN A NUTSHELL. Joseph O'REILLY. Albahari and Ben Albahari. Fifth Edition. Tokyo. Sebastopol. Beijing. Cambridge. Koln.

NETWORK SECURITY HACKS *

Mobility Introduction Android. Duration 16 Working days Start Date 1 st Oct 2013

"Charting the Course... MOC B Server Virtualization with Windows Hyper-V and System Center. Course Summary

Schneps, Leila; Colmez, Coralie. Math on Trial : How Numbers Get Used and Abused in the Courtroom. New York, NY, USA: Basic Books, p i.

Java 7 Recipes. Freddy Guime. vk» (,\['«** g!p#« Carl Dea. Josh Juneau. John O'Conner

WAYNESBORO AREA SCHOOL DISTRICT CURRICULUM INTRODUCTION TO COMPUTER SCIENCE (June 2014)

Programming Lists of Data

Enterprise JavaBeans 3.1

Learning Web Design. Third Edition. A Beginner's Guide to (X)HTML, Style Sheets, and Web Graphics. Jennifer Niederst Robbins

IMPROVEMENT THE PRACTITIONER'S GUIDE TO DATA QUALITY DAVID LOSHIN

PYTHON IN A NUTSHELL. O'REILLY Beijing Cambridge Farnham Köln Sebastopol Taipei Tokyo. Alex Martelli. Second Edition

Contents. 1 Introduction. 2 Feature List. 3 Feature Interaction Matrix. 4 Feature Interactions

Programming the Mobile Web

Android, Where s My Car?

Zeenov Agora High Level Architecture

Programming Your App to Make Decisions: Conditional Blocks

Contents. BBS Software as a Service (SaaS),7. EH introducing aoudco.pu.ing 1. Distinguishing Cloud Types 4. Exploring

CHAPTER 1: INTRODUCTION TO ANDROID, MOBILE DEVICES, AND THE MARKETPLACE

[PACKTl. Flash Development for Android Cookbook. Flash, Flex, and AIR. Joseph Labrecque. Over 90 recipes to build exciting Android applications with

PaintPot. Figure 2-1. The PaintPot app

Contents. Introduction and System Engineering 1. Introduction 2. Software Process and Methodology 16. System Engineering 53

FIFTH EDITION. Oracle Essentials. Rick Greenwald, Robert Stackowiak, and. Jonathan Stern O'REILLY" Tokyo. Koln Sebastopol. Cambridge Farnham.

Historical Slideshow App A Coding Solution (This is a spoiler document)

Wiley Publishing, Inc.

Beautiful Visualization

LINUX DESKTOP HACKS. Nicholas Petreley andjono Bacon. O'REILLY 4 Beijing Cambridge Farnham Kbln Paris Sebastopol Taipei Tokyo

Computer Security Basics

Beginner's Guide. LiveCode Mobile Development. LiveCode. Create fun-filled, rich apps for Android and ios with. Colin Holgate PUBLISHING

Master Data Management

NETWORK SECURITY HACKS

Named Memory Slots. Properties. CHAPTER 16 Programming Your App s Memory

Network Security. Windows 2012 Server. Securing Your Windows. Infrastructure. Network Systems and. Derrick Rountree. Richard Hicks, Technical Editor

Client Overview. Engagement Situation. Key Requirements. Xoriant Solutions

Mobile Apps with App Inventor

1. Who can use Agent Portal? 2. What is the definition of an active agent? 3. How to access Agent portal? 4. How to login?

Mac OS X Lion Server

Job Hazard Analysis. A Guide for Voluntary Compliance and Beyond. From Hazard to Risk: Transforming the JHA from a Tool to a Process

Android in Action. Second Edition. Revised Edition of Unlocking Android MANNING. (74 w. long.) W. FRANK ABLESON CHRIS KING ROBI SEN.

Transcription:

App Inventor Create Your Own Android Apps David Wolber, Hal Abelson, Ellen Spertus & Liz Looney Beijing Cambridge Farnham Koln O'REILLY Sebastopol Tokyo

Contents Foreword xiii Preface xv 1. Hello Purr 1 What You'll Learn 1 The App Inventor Environment 2 Designing the Components 3 Adding Behaviors to the Components 8 Packaging the App for Downloading 14 Sharing the App 15 Variations 15 Summary 16 Parti. 12 Customizable Apps 2. PaintPot 19 What You'll Learn 20 Getting Started 20 Designing the Components 20 Adding Behaviors to the Components 24 The Complete App: PaintPot 35 Variations 35 Summary 36 3. MoleMash 37 What You'll Build 37 What You'll Learn 38 Getting Started 38 Adding Behaviors to the Components 41

viii Contents The Complete App: MoleMash 49 Variations 49 Summary 50 4. No Texting While Driving 51 What You'll Learn 52 Getting Started 53 The Complete App: No Texting While Driving 66 Variations 66 Summary 68 5. Ladybug Chase 69 What You'll Build 69 What You'll Learn 69 Designing the Components 70 Getting Started 71 Animating the Ladybug 71 Displaying the Energy Level 74 Adding an Aphid 78 Adding a Restart Button 82 Adding the Frog 83 Adding Sound Effects 86 Variations 86 Summary 87 6. Paris Map Tour 89 What You'll Learn 89 Designing the Components 90 Setting the Properties of ActivityStarter 90 Adding Behaviors to the Components 91 Setting Up a Virtual Tour 94 Variations 98 Summary 98 7. Android, Where's My Car? 99 What You'll Learn 99 Getting Started 100 Designing the Components 100

Contents ix Adding Behaviors to the Components 102 The Complete App: Android, Where's My Car? 111 Variations 111 Summary 111 8. Presidents Quiz 113 What You'll Learn 113 Getting Started 114 Designing the Components 114 Adding Behaviors to the Components 116 Making the Quiz Easy to Modify 122 Switching the Image for Each Question 124 Checking the User's Answers 126 The Complete App: The Presidents Quiz 129 Variations 130 Summary 130 9. Xylophone 131 What You'll Build 131 What You'll Learn 132 Getting Started 132 Designing the Components 132 Creating the Keyboard 133 Recording and Playing Back Notes 138 Variations 145 Summary 145 10. MakeQuizandTakeQuiz 147 What You'll Learn 148 Getting Started 148 Designing the Components 149 Adding Behaviors to the Components 150 The Complete App: MakeQuiz 163 TakeQuiz: An App fortaking the Quiz in the Database 164 TakeQuiz: Modifying the Blocks to Load the Quiz from the Database 164 The Complete App:TakeQuiz 166 Variations 166 Summary 168

x Contents 11. Broadcast Hub 169 What You'll Learn 170 Getting Started 170 Designing the Components 171 Adding Behaviors to the Components 172 The Complete App: Broadcast Hub 184 Variations 186 Summary 186 12. NXT Remote Control 187 What You'll Learn 188 Getting Started 188 Designing the Components 189 Adding Behaviors to the Components 192 Variations 201 Summary 201 13. Amazon at the Bookstore 203 What You'll Learn 203 What Is an API? 204 Designing the Components 207 Designing the Behavior 208 Customizing the API 215 Variations 216 Summary 216 Part II. Inventor's Manual 14. Understanding an App's Architecture 219 Components 220 Behavior 221 Summary 227 15. Engineering and Debugging an App 229 Software Engineering Principles 229 Debugging an App 236 Summary 240

Contents xi 16. Programming Your App's Memory 241 Named Memory Slots 241 Properties 242 Defining Variables 243 Setting and Getting a Variable 244 Setting a Variable to an Expression 245 Summary 248 17. Creating Animated Apps 249 Adding a Canvas Component to Your App 249 The Canvas Coordinate System 250 Animating Objects with Timer Events 251 High-Level Animation Functions 253 Interactive Animation 256 Specifying Sprite Animation Without a ClockTimer 257 Summary 258 18. Programming Your App to Make Decisions: Conditional Blocks 259 Testing Conditions with if and ifelse Blocks 260 Programming an Either/Or Decision 261 Programming Conditions Within Conditions 262 Programming Complex Conditions 263 Summary 266 19. Programming Lists of Data 267 Creating a List Variable 268 Selecting an Item in a List 269 Using an Index to Traverse a List 269 Creating Input Forms and Dynamic Lists 273 Lists of Lists 277 Summary 280 20. Repeating Blocks: Iteration 281 Controlling an App's Execution: Branching and Looping 281 Repeating Functions on a List Using foreach 282 A Second foreach Example: Displaying a List 284 Repeating Blocks with while 286 Summary 289

xii Contents 21. Defining Procedures: Reusing Blocks 291 Eliminating Redundancy 293 Defining a Procedure 294 Calling a Procedure 295 The Program Counter 296 Adding Parameters to Your Procedure 296 Returning Values from a Procedure 299 Reusing Blocks Among Apps 301 A Second Example: distancebetweenpoints 301 Summary 303 22. Working with Databases 305 Storing Persistent Data in TinyDB 306 Retrieving Data from TinyDB 307 Storing and Sharing Data with TinyWebDB 308 Storing Data with TinyWebDB 309 Requesting and Processing Data with TinyWebDB 310 GetValue-GotValue in Action 311 Setting Up a Web Database 315 Summary 317 23. Reading and Responding to Sensors 319 Creating Location-Aware Apps 319 Using the Orientation Sensor 324 Using the Accelerometer 328 Summary 332 24. Communicating with Web APIs 333 Talking to Web APIs That Generate Images 335 Talking to Web Data APIs 341 Creating Your Own App Inventor-Compliant APIs 345 Summary 348 Index 349