Using MIT App Inventor in school
networking environments
May 2015
Hello, Info, Tech and Networking Specialists,
Students at your school will be using MIT App Inventor, a Web-based software tool developed at MIT for programming Android phones and tablets. We have found that every school’s IT setup is a little different. Please read this document to understand the requirements that need to be in place so that your students can successfully connect to and use App Inventor.
We have a few different ways to make App Inventor work. The most common options are discussed in this document. There may be other ways to get things working. Only you will be able to come up with a solution specific to your school.
Introduction to App Inventor
App Inventor is a web service hosted on MIT’s servers and Google App Engine. The main App Inventor Web site is at:
In order to create apps, users need to log in at:
And that web site needs to be accessible from browsers running on student laptops. (Note: MIT has encountered school networks that block connections to the sites at MIT. Such blocks need to be removed before students can use App Inventor.) Note: The appinventor.mit.edu website is hosted on Internet Protocol (IP) addresses service from a content distribution network used by GitHub. ai2.appinventor.mit.edu is served from Internet Protocol addresses located at Google. The exact addresses can vary over time, so we cannot provide a definitive list here.
If students are using Android devices (phones or tablets) the device needs to communicate with the software running on the student laptops. There are two methods for doing this. The recommended method is to connect wirelessly, over a WiFi network. The other method is to use a USB cable to connect the laptop to the device. Each method has strengths and weaknesses, and the choice of which method use depends on your school’s environment.
With either method, each Android device will need to have the app “MIT AI2 Companion” installed to support App Inventor “live development” (i.e., instant changes on the phone in response to changes in the browser). The companion can be installed from the Google Play Store, or it can be downloaded to laptops and directly loaded into the device.
Here’s the link to the MIT AI2 Companion App in case people need to download it: https://play.google.com/store/apps/details?id=edu.mit.appinventor.aicompanion3
The companion software on the device needs to be updated periodically when there are new releases of MIT App Inventor. This updating happens automatically in the case where the device is connected to the Web.
Connecting to the device over WIFI
For the app to work, both the laptop running the App Inventor software and the device need to be on the same WiFi subnet, not separated by any firewall. Both the laptop and the device need to connect to an MIT server (a so-called “rendez-vous server”) in order to exchange IP addresses. Once the device and the laptop have exchanged addresses, they will connect to each other directly over the school network.
The critical piece of getting the WIFI connection to work is having the phones and the computers on a network or networks, with no restriction on connections between network devices. This kind of restriction is common in hotels, public WIFI, and often, schools. This graphic illustrates how these restrictions might be functioning in your network.
If your school’s network restrictions prevent using the phones over WIFI, a solution we often use is to deploy a wireless access point to create a custom network just for the purpose of App Inventor. For example, when we conduct our own MIT workshops in network-restricted environments, we often share a single external connection to the Internet by creating a custom network using a store-bought router, or by using connection sharing from a laptop. With this approach, all of the computers and phones need to connect to the custom network during the workshop. The wireless access point is then removed when the workshop is over and students are done using it.
Connecting to the device with a USB cable
To use USB cables, the student laptops need to install a software package called App Inventor Setup, which contains applications for communicating with the hardware device.
The App Inventor Setup package also includes the Android emulator, that lets students work and test without an Android device at all.
The instructions for installing App Inventor Setup and using USB cables are here:
This will simply work with Android devices on most Mac or GNU/Linux operating systems.
For Windows, there’s a complication: Windows systems require installing device drivers. These drivers are specific to the type of device (e.g., the specific brand of phone). Google provides a page on drivers from which people can download device drivers for various phones, but in some cases the drivers need to be obtained from the device manufacturer. We highly recommend that Windows users of App Inventor use the WIFI connect method, which does not require installing drivers or the App Inventor setup software. Google Nexus devices generally work, even on Windows, without extra drivers. On Mac, extra drivers are not necessary for any phone.
In summary, the USB connection method is not recommended. Using WIFI connect instead avoids driver issues, but it requires network connectivity using the school’s WiFi.
Using the Emulator
For schools that cannot provide hardware devices for every student, App Inventor can be used with the Android Emulator, a software program that runs on student laptops and emulates many of the features of Android devices. The emulator software is included as part of the App Inventor Setup package, and instructions on using the emulator are here:
The Emulator - Silent Install
The emulator must be installed on each machine individually. If you are setting up a lab of several Windows computers, this installation can be streamlined somewhat by using “silent mode, where you create a configuration file and then duplicate that file on every machine,with no further need for console interaction.
Here are the flags to use with the setup package:
/S - for silent mode (default will be all users) and you will need admin permissions.
/user=all or /user=current (again you will need admin permissions for all users)
/update - update installation.
/skiplicense - skip license
For example, use the following command by typing it at the terminal or by including it in a script:
>MIT_App_Inventor_Tools_2.3.0_win_setup [/S] [/user=all or /user=current]
or
>sudo MIT_App_Inventor_Tools_2.3.0_win_setup [/S] [/user=all or /user=current]
if you need admin permissions.
The Emulator - User storage
The emulator is the standard Google Android emulator, which literally emulates an Android phone. Just as phones have memory where the operating system and applications are stored, so does the emulator. In the case of the emulator, the storage lives in a file on the laptop. On a Mac, you find this user-specific file in
/Users/<username>/.appinventor/emulator/Appinventor-emulator-data
This file is created the a user the first time a user tries to use the emulator. For Windows, the file is located at
/Program Files/AppInventor/commands-for-Appinventor/extras/Appinventor-emulator-data
by copying a template which was loaded as part of the App Inventor setup tools.
The Emulator - AI Companion and updating
Just as the physical device uses the AI2 Companion App to support live development, the emulator needs a copy of the companion installed in it (emulated, user-specific) memory. The App Inventor setup tools install a “place holder” version of Companion when they install the emulator. Unfortunately, this version of the Companion will be out of date, due to new releases of MIT App Inventor since the setup tools were created. Accordingly, the first time a user uses the emulator, not only is the Appinventor-emulator-data copied, but the user is prompted to upgrade the emulator’s Companion software. If you do not respond positively to the pop up instructions that appear, the Companion will not update. Running App Inventor without the updated Companion may cause coding problems for the user. The updated Companion is stored in the copy of Appinventor-emulator-data in the User’s directory.
If you use Deep Freeze
Some school networks use an application called Deep Freeze to limit access to their PCs. If you use Deep Freeze, it probably removes the User's personalized copy of Appinventor-emulator-data. This results in a fresh copy being brought in the next time the User logs in (say on the next day). This means each User has to update the Companion again every day.
Administrators can get around a daily update requirement: . Using an administrator account, login, use the emulator, go through the Companion update process and THEN COPY Appinventor-emulator-data FROM THE USER'S DIRECTORY back to the version in /Program Files. Make the copy before Deep Freeze makes its "official" frozen copy. As a result, when students log in and a fresh copy of App Inventor-emulator-data is copied from Program Files to their directories, they will get the copy that contains the up-to-date Companion.
Note: You may need to experiment to get this to work, depending on the details of your network setup. Some Deep Freeze programs erase any change to the computers when they restart, and updating can be tricky. One school found through extensive testing that the App Inventor-emulator-data has to be copied (after updating) from the user profile back to the .app inventor/emulator folder in the root of the C: drive, not the Program Files folder.
Installation Instructions
The complete instructions for installation are here:
The requirements are boiled down to a checklist below, which we hope will help you figure out what you actually need to do help us make App Inventor work at your school.
Thank you for your help and support! Please use the MIT through the App Inventor Forum if you get stuck or need some help.
Checklist for All Features
Requirement for:
|
WIFI connect to phone (recommended)
|
USB cable to phone
|
Emulator
|
App Inventor Setup Software
|
X
|
X
|
X
|
Browser:
Firefox 3.6+ -or- Chrome 4+ |
X
|
X
|
X
|
Whitelist (browser access)
appinventor.mit.edu
ai2.appinventor.mit.edu
http://qyv.me
|
X
|
X
|
X
|
Whitelist (port 80 connection, in app)
rendezvous.appinventor.mit.edu
|
X
| ||
Direct connection between devices on WIFI, computer and phone.
|
X
| ||
Windows Only: device drivers for specific android devices, as needed.
|
X
|
댓글 없음:
댓글 쓰기