Learning Objectives

By the end of this lesson, students will be able to:

  1. Utilize the App Inventor environment to open, update, and test an app.
  2. Identify the Designer and Blocks Editor components in the App Inventor environment.
  3. Modify code blocks and component properties to alter an app's appearance and functionality.
  4. Test and troubleshoot a project.

Lesson Plan

Activity

šŸ”½ Introduction to MIT App Inventor & Starting App Inventor

App Inventor is a block-based programming environment that enables users to create mobile applications for tablets and smartphones. Log in using your Google account.

šŸ“±MIT App Inventor Theory

šŸ”½ Demonstration of App Inventor Programming Environment : Two major view - Designer and Blocks

  1. Designer

Designer

šŸ“±MIT App Inventor Theory

  1. Blocks : To switch to the Blocks Editor, click on the "Blocks" button located in the upper right corner of the screen. The Blocks Editor is comprised of two main parts:

Blocks Editor

šŸ“±MIT App Inventor Theory

šŸ”½ Modifying the TwoButtonGame app

  1. Download TwoButtonGame.aia from files above. An aia file is a project file created by the MIT App Inventor that teaches beginners to create Android and iOS applications.
  2. Go to http://appinventor.mit.edu/ and click on "Create App" located at the top of the page. Log in using your Google account.

Untitled

  1. Ask students to import the TwoButtonGame.aia project and demonstrate how to do so. 1ļøāƒ£ Click the "Project" button and select "Import project (.aia) from my computer" from the drop-down menu. The "Import Project..." dialogue box will appear. 2ļøāƒ£ Click the "Choose file" button and select the specific .aia file from the source folder in the "Open" dialogue box. 3ļøāƒ£ Click the "open" button and then the "OK" button in the "Import Project..." dialogue box.

Untitled

Untitled

  1. Letā€™s run the App

3.1. Designer View

Untitled

Untitled

Untitled

Untitled

Untitled

Untitled

Untitled

Untitled

3.2 Blocks View

Untitled

Untitled

Untitled

Untitled

   2ļøāƒ£ Property setter(the dark-green "set **ComponentName. Property**" blocks)

Untitled

Untitled

  3ļøāƒ£Ā Built-in: code blocks that does not belong to a component, e.g.math. operation

Untitled

Untitled

  1. Auto-saving function: The App Inventor saves your project periodically. It is safer to save the project manually using the menu command Projects Ā» Save project or Projects Ā» Save project as

Untitled

  1. Debugging: Ask students to test their app using the MIT AI2 Companion app. Remind students that it is important to regularly and frequently test and debug their apps. A block has a red triangle icon if it has an error or a yellow triangle icon if it has a warning (after clicking the button ā€œShow Warningā€). Clicking the icon shows the warning or error message. Debug all the warnings and errors!

Untitled

Untitled

Untitled

Untitled

Open the MIT AI2 Companion on the device and click the blue button to scan the QR code that appears on the computer.

2ļøāƒ£ Or Select ā€œRefresh Companion Screen or Reset Connection.

Closing

Answer: A. Designer

Answer: A. Designer

B. Component

B. Component