Fortune Teller 2 What You'll Build 2 What You'll Learn 3 Iteration or how we will get to Finished App. 3

Similar documents
What You're Building 2. Getting Started 3 Introduction 4 Iteration or how we will get to Finished App. 4

TalkToMe: A beginner App Inventor app

TalkToMe: Your first App Inventor app

App Development with MIT App Inventor

AppyBuilder Beginner Tutorials

Android Programming Family Fun Day using AppInventor

Magic 8-Ball. Part One: Click a Button, Hear a Sound. DESIGN: App Inventor Designer. Magic 8-Ball Predicts the Future

3. Text to Speech 4. Shake it

An online version of these worksheets is available at:

Understanding an App s Architecture

Activity Digital Doodle

Comprehensive Guide to Using Effectively JW Library

Technovation 2018 Hack Day

Designing Your Teacher Page. Medora Community School Corporation

IN THIS CLASS WE ARE GOING TO LEARN THE BASIC FEATURES OF WINDOWS 8.1 WITH HANDS ON TRAINING THE CLASS WILL RUN ON THE SPEED OF THE AVERAGE STUDENT

ACS-1805 Introduction to Programming (with App Inventor)

PaintPot. Figure 2-1. The PaintPot app

Learn to Code. App Inventor Overview

Chromebooks boot in seconds, and resume instantly. When you turn on a Chromebook and sign in, you can get online fast.

Outlook Web Access. In the next step, enter your address and password to gain access to your Outlook Web Access account.

CHAPTER 1 COPYRIGHTED MATERIAL. Finding Your Way in the Inventor Interface

BCSWomen Android programming (with AppInventor) Family fun day World record attempt

Introduction to the Internet. Part 1. What is the Internet?

INTRODUCTION TO CLOUD STORAGE

S A M P L E C H A P T E R

NCMail: Microsoft Outlook User s Guide

Mobile Programming (MIT App Inventor 2)

Technovation Hack Day

Hello, and welcome to the Alexicomtech tutorial. I will show you step by step how to set up your interactive pages. Please feel free to ask questions

Adobe Flash CS3 Reference Flash CS3 Application Window

Getting to Know Windows 10. Handout

Reading: Managing Files in Windows XP

PaintPot: (Part 1) What You're Building. Before starting

A Document Created By Lisa Diner Table of Contents Western Quebec School Board October, 2007

Drupal Cloud Getting Started Guide Creating a Lab site with the MIT DLC Theme

PowerPoint Basics: Create a Photo Slide Show

The purpose of this tutorial is to introduce you to the Construct 2 program. First, you will be told where the software is located on the computer

Grade Point Scales Standard Honors AP/College A B C D F Sample file

RECORD. Published : License : None

WYBCS Android Programming (with AppInventor) Family fun day

How to Construct. Accessible Talking Books MAC

On the Web sun.com/aboutsun/comm_invest STAROFFICE 8 DRAW

Using web-based

Interactive Tourist Map

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. App Inventor Workbook

Boise State University. Getting To Know FrontPage 2000: A Tutorial

Section 1. System Technologies and Implications. Modules. Introduction to computers. File management. ICT in perspective. Extended software concepts

FILE ORGANIZATION. GETTING STARTED PAGE 02 Prerequisites What You Will Learn

Karlen Communications Track Changes and Comments in Word. Karen McCall, M.Ed.

NCMail: Microsoft Outlook User s Guide

ACADEMIC TECHNOLOGY SUPPORT

SharePoint 2010 Site Owner s Manual by Yvonne M. Harryman

Instructions for the 3 Spinner & More Programs

Accessing E-Books using OverDrive

Assignment 1 What is a Computer?

App Inventor + IoT: Basic Bluetooth Connection Setup

Zello Quick Start Guide for Kyocera TORQUE

How to Create Greeting Cards using LibreOffice Draw

A new clients guide to: Activating a new Studio 3.0 Account Creating a Photo Album Starting a Project Submitting a Project Publishing Tips

Making ecards Can Be Fun!

Wimba Pronto. Version 2.0. User Guide

GETTING STARTED GUIDE

ArcMap Online Tutorial Sarah Pierce How to map in ArcMap Online using the Fresh Prince of Bel Air as an example

Wimba Pronto. Version 2.1. User Guide

Compendium Basics Exercise

Creating Vector Shapes Week 2 Assignment 1. Illustrator Defaults

Guide to using Worship: Leading & Preaching

How to Use TeamSnap for Parents

CheckBook Pro 2 Help

Microsoft Access Database How to Import/Link Data

Chapter One: Getting Started With IBM SPSS for Windows

Welcome to. Manager s User Guide. 1 Claris Healthcare

Optimized Communications Optimized Security Optimized Expressions Optimized Performance Optimized for Your Family...

Chapter 1. Getting Started

Software Prototyping. & App Inventor

Firefox for Nokia N900 Reviewer s Guide

TMG Clerk. User Guide

Internet Basics HANDOUTS

Using Functions in Alice

Trash in the Dock. May 21, 2017, Beginners SIG The Dock (Part 3 of 3)

INTERNET BASICS. GETTING STARTED PAGE 02 Prerequisites What You Will Learn

PowerPoint Slide Basics. Introduction

LP2CD Wizard 2.0 User's Manual

Facebook Tutorial. An Introduction to Today s Most Popular Online Community

Using PowerPoint to Create an Interactive Multimedia Portfolio Ben Johnson

The Grid. User Manual Part I: Getting Started. 1. Getting Started System requirements Installation procedure...

Buzz Student Guide BUZZ STUDENT GUIDE

Introduction to Qualtrics ITSC

TourMaker Reference Manual. Intro

Transitioning Teacher Websites

Creating a Book Trailer with Windows Live Movie Maker. A book trailer is different than a book talk. A book trailer

Barchard Introduction to SPSS Marks

MoleMash for App Inventor 2. Getting Started. Introduction. Workshop, S.1

Make a Holiday PhotoShow

PaintPot Hack This is an app with a background image of a cat that the user can draw on the image with different colors

Oracle Cloud. Content and Experience Cloud Android Mobile Help E

2007, 2008 FileMaker, Inc. All rights reserved.

Microsoft Office 365 includes the entire Office Suite (Word, Excel, PowerPoint, Access, Publisher, Lync, Outlook, etc ) and an OneDrive account.

Kona ALL ABOUT FILES

QUICK START GUIDE NTS HOSTED PBX CALL MANAGER. Welcome. Getting Oriented

Transcription:

Fortune Teller 2 What You'll Build 2 What You'll Learn 3 Iteration or how we will get to Finished App. 3 Iteration 1 Create still image of our App 4 Getting Started 4 Bus stop reached! 8 Iteration 2 Say a fortune 9 Getting Started 9 Bus stop reached! 11 Variations 12 I see a mistake! 13 Appendix 1. 14 Variables 14 Designer 15 Source 15 Assets 15 Other possible fortunes. 17 1

Fortune Teller Show a random fortune each time the user clicks a button. Use a list to hold the possible fortunes. Figure 1 Fortune teller App. What You'll Build Along the way, you ll learn about buttons, lists and non-visible components. 2

What You'll Learn This tutorial covers the following concepts Show how to use buttons Show how to use non-visible components ( text to speech ) Show how to use lists. Iteration or how we will get to Finished App. Now we are not going to go immediately create the finished App. We are going to use a process called iteration to start with a basic App and then gradually iterate to our finished app. It s like getting on a bus. There are bus stops along the way to our finish destination, so all aboard and off we go! Figure 2. Iteration is like a bus stop. So the iterations, or bus stops we will go through are; 1. Create still image of our App 2. Say a fortune At each step, we should have a working app before we continue to the next step, we call this iterative development. 3

Iteration 1 Create still image of our App Getting Started Connect to the App Inventor website and start a new project. Name it " FortuneTeller " Figure 3. Start new project Next connect the Blocks editor to your Android device by WiFi. From the Connectmenu select AI Companion, which will display a two dimensional visual QR code for a 6 character code like the one shown below: 4

On the your Android device, launch the MIT AI2 Companionapp, press, and scan the QR code displayed in the browser. (Alternatively, you can type in the 6 character code and press ). This initiates a live development connection between the browser and the Android device. You should now see the app s components on the device, and all changes you make in the Designer and Blocks windows should be reflected on the device. Because we are using iteration, our first stop is to Design the look and feel of our app. We will do this in the Designer editor and not need to create any blocks of code for our first stop! You re in the label. window, where you add components to your app. Drag a Button and 5

There are two main types of components in an app: visible and non-visible. The app s visible components are the ones you can see when the app is launched things like buttons, text boxes, and labels. These are often referred to as the app s user interface. Non-visible components are those you can t see, so they re not part of the user interface. Instead, they provide access to the built-in functionality of the device; for example, the Texting component sends and processes SMS texts, the LocationSensor component determines the device s location, and the TextToSpeech component talks. The non-visible components are the technology within the device little people that do jobs for your app. Component Type Pallette Group What you will name it Purpose TextToSpeech Media TextToSpeech1 We use the TextToSpeech component to say the fortune picked. Table 2. All of the non-visible components for the Fortune Teller app Set the properties of the components as described below: Component Type Action Another Action Button1 Change Text property to "". Change image to FortuneTeller.png Change height to 80% ( so we can see label1 ) All done for Button1 Label1 Set FontSize to 16 Set Text to Click the crystal ball to hear your fortune Table 3. All of properties for components for the Fortune Teller app 6

Figure 4. Visible components we use. Figure 5. Non-visible components we use. Bus stop reached! We have finished our first iteration ( reached our first bus stop ). At this point we should have an App which looks like our finished application, but nothing happens yet! In the next iterations we will add the smarts, so when we do something in the game, something happens. 7

Iteration 2 Say a fortune When we click on the crystal globe ( alright, anywhere on the button), we want to say a random fortune. Getting Started Click the button in the upper right corner to switch from the Designer to the Blocks Editor, where you will specify the behavior for your app. Populate the Blocks Editor with blocks from the Blocks pane from the drawer, select the event handler block from the drawer ( in the built-in blocks ), select the block. From the Built-in draw, in the blocks, select the empty string block. Click on name to change its name to saying. Move the definition. to the saying variable If we move the mouse pointer over the local variable saying like Figure 5. Local variable saying

We can the move the block get.saying between the two arms of the local variable saying block like in figure 5. From the built-in drawer, drag the block and add it to the block. The random item we want to get from is the global variable Figure 6. Global variable fortunes. That we create by dragging from the Build-in folder in the drawer to the blocks viewer. Change the name to fortunes. Drag from the Built-in folder in the drawer and add it to the that we have already dragged. Now the list has 2 elements and need 5, so hover your mouse over the blue mutator button ( in the red circle ) so we get a pop out like Figure 7.

Figure 7. Extending our list. We drag item 3 times to the right ( where the arrow points ) to extend our list. It should now look like Figure 8. Figure 8. Extended list. We click our list to our fortunes global variable block. We now by dragging from the Build-in folder in the drawer to the blocks viewer. We do this 5 times. We then click all our blocks to our list and add the text between the so it looks like Figure 6. We are finished creating our fortunes global variable. Connect the blocks not connected from the previous step to form a block like figure 9. Figure 9. When button.click This is an App Inventor blocks program that says When Button1is clicked, say a random saying from our global fortunes list.

Bus stop reached! We have finished our second iteration ( reached our first bus stop ). At this point we should have an App which looks like our finished game, but nothing happens yet! Test your program by pressing on the globe. The phone should read a fortune! Variations Once you get this program running, you may want to do the following additional features to extend it. For example, With the app running turn the screen sideways. What happens? Do we want this to happen? If not, how do we fix it? Our app says Screen1 ( see figure 1 or look at you app). Why? How do we change it to say Gypsy Rose Lee? Change the possible fortunes ( see a list of possible fortunes at the end of this tutorial ). ( hard ) At the moment, a fortune can be repeated. How can we remove a fortune once it's chosen to prevent it being picked again? If we remove all fortunes, what should we do?

P.S. We created this tutorial standing on the shoulders of giants. We want to acknowledge the original workshop at http://ice-web.cc.gatech.edu/dl/?q=node/734 P.P.S. Respect copyright so programmers,artists,musicians and others can make a living from their work and we can enjoy the fruits of their work! I see a mistake! If you see a mistake, email coderdojocastleknock@gmail.com so we can fix this tutorial.

Appendix 1. Variables fortunes Saying You will notice that fortunes is a global variable, which means it can be used everywhere in the app. You will notice that sayings is a local variable, which means it only be used by anything in the in part of the variable block. Built-in blocks When Button1.Click 14

Procedure Blocks None. Designer Source Fortune Teller Download this to your computer and then upload it to your app inventor account. To do this ; Click on the Don t touch my phone link above When you run this, the source code shown downloads to your laptop where it can be then uploaded to you App Inventor tab via; Projects -> Import Project (.aia) from my computer Assets Assets are what we sometimes call sounds and images used in a game. 15

FortuneTeller.png ( Fortune Teller picture) Download this to your computer and then upload it to your fortune teller project. To do this ; Click on the FortuneTeller.png link above When you run this, the image shown to your laptop where it can be then uploaded to you App Inventor via; Figure 10. Setting Fortune Teller image for Button1 In the Designer tab. For button1 property, like in Figure 10, in the 1st circle highlighted, browse to the downloaded image and set it here. Ps to not forget to set the height, like in Figure 10, in the 2nd circle to 80% so the label below the button is seen. 16

Other possible fortunes. A man loves his sweetheart the most, his wife the best, but his mother the longest." - Irish Proverb "A man's work is from sun to sun, but a mother's work is never done." - Author Unknown "No gift to your mother can ever equal her gift to you - life." - Author Unknown "Sweater is a garment worn by child when its mother is feeling chilly." - Ambrose Bierce "There is only one pretty child in the world, and every mother has it." - Chinese Proverb $ is just a concept. People empower it. 'The study of history is the beginning of political wisdom.' 'The wit of a graduate student is like champagne.' 'The world is round so the place which may seem like the end, may also be only the beginning.'. 80% of the results flow from 20% of the activities - Pareto Principle A baby is God's way of saying the world should go on. A bashful admirer will soon be revealed. A beauty is a woman you notice, a charmer is a women who notices you. A book is in your future. A clean conscience is a soft pillow. A committee of one gets things done. - Joe Ryan A company is judged by the president it keeps. - James Hulbert A diamond is a hunk of coal that stuck with it. A diamond is a piece of coal that stuck with the job. A friend asks only for your time not your money. A friend is someone who knows the song in your heart, and can sing it back to you when you have forgotten the words. A friend will soon bring you a gift. A girl who is free for the evening can be one of the most expensive things in the world. A good beginning is only half done. A good example is the best sermon. A good time to start something new. 17

A journey of 1000 miles begins with one step. ~ Lao Tzu A lean compromise is better than a fat lawsuit. - George Herbert A little girl, asked where her home was, replied, "where mother is." - Keith L. Brooks A long life may not be good enough, but a good life is long enough -Ben Franklin A man can't get rich if he takes proper care of his family. - Navajo saying A mother is not a person to lean on, but a person to make leaning unnecessary. - Dorothy Fisher A mother understands what a child does not say. - Jewish proverb A new challenge is near. 18