App Inventor Quick Start Guide
App Inventor Quick Start Guide
Summary
1. Presentation. . . . . . . . . . Page 2
This first project allows you to get acquainted with the environment offered by App Inventor.
(Project development website and block editor)
This section is dedicated to the use of variables (declarations, types, and calculations) as well
to the different structures: loops and alternatives.
a website allowing to create a project: Creating the graphic page of the future
application (submission of necessary items for the application on a work page _ a bit
like a Form in visual C#). This website requires a Google account (gmail) to
to function.
a resident program on the computer that allows for program input (association
blocks linked to the previously defined objects in the web space). This program
also allows the download of the application to the desired media (tablet,
phone...)
Originally, the APP INVENTOR project was created by Google Labs... then abandoned. Today
this concept is resumed by the MIT (Massachusetts Institute of Technology
[Link]
To install the APP INVENTOR IDE on your computer, it is necessary to follow these few steps.
steps mentioned in the LEARN tab of the site.
Test your system: Test your PC system to install the platform
form JAVA in case it is not present.
Download and install the App Inventor Software:
App Inventor [Link] file. This program, executed using the
JAVA platform will allow the entry of blocks.
In addition, the USB driver enabling the tablet/computer connection will need to be
also installed (downloadable from the manufacturers' websites)
Note
Other development environments such as Eclipse or Processing (combined with the SDK
Android allows the creation of applications on Android platforms. These
environments offer programming possibilities that App Inventor does not allow
However, the ergonomic aspect of AppInventor makes it an excellent choice for
quickly develop small personal applications (GUI interface) on tablets or on
phones.
Jean Moulin High School: Getting Started Guide for AppInventor. Laurent P. 2
From the Google Chrome browser, go to the MIT App Inventor website:
[Link] click on .
Enter the email address of your Google account as well as the password (a Google account
by computer will be given by your teacher.
Click on Save,
then on Allow
Jean Moulin High School: Getting Started Guide for AppInventor. Laurent P. 3
The first hands-on project consists of an application that allows you to display an image.
as soon as the "Press here" button is touched.
Now, it is necessary to launch the block editor in order to implement the associated programming.
to the different objects:
Click on
The following message appears (at the bottom of your browser window):
Click on Save.
Then Open (right-click while positioned on the name of the downloaded file)
Activate
Execute
Note:
A left click in the workspace allows access
directly to the shortcuts of the left window
(block library)
My blocks contain the objects defined in the project. Here we will find, for example, the button with its events.
and associated properties.
Advanced contains additional elements (properties, methods) for objects already defined in the
project.
Connect the tablet with its cable to one of the USB ports on the computer.
Wait for this one to be recognized.
A second project
This second project utilizes the 'Canvas' object. This object can contain a background image.
and can react to 'dragged' type events (movement). Where this object becomes very
interesting, is that it has drawing methods (line, circle...).
This second project takes up the example of the first (appearance of an image) and allows drawing.
of a curve drawn with a finger on the background image of the container.
Event it
triggering when the
finger "slides" in the The method 'DrawCircle' has
canvas. need the values contained
in prevX and prevY. We have
access to these blocks from
the tab MyBlocks
MyDefinitions
DrawCircle method.
Test the obtained functionality and especially change the parameter related to the radius of the
circle.
Modify the project by placing the image '[Link]' in the canvas this time.
You can also modify the 'width' and 'height' properties of the canvas.
This section is not intended to review all the possibilities offered; there would be
rather, it is about showing the use of essential blocks in programming.
The variables
Note that in AppInventor, almost all variables are global (except for those that
are passed as arguments to the methods. It's not fantastic... but that's how it is,
then too bad!
Variable declaration
Declaration of a variable
of type 'text' (string)
Declaration of a variable
of type "number" (double).
One can expect that the program on the side does not
fonctionne pas car la propriété "Text" de "[Link]"
reasonably expect text ...Well no! That
works! The type changes of the variables
font implicitly (easier than in Visual C# but good)
less rigorous...)
Just use from "My Blocks" "My Definitions" the block "Set global". As a title
for example:
allows to achieve
the operation:
mavariable2 = 4 x
mavariable2
while(mavariable2<10)
{
mavariable=mavariable+1;
[Link]=mavariable2;
}
if (mavariable2<10)
{[Link]="valeur plus petite que 10";
} else
{[Link]="valeur supérieure ou égale à
10";
}