Click here for a version of this document where you can make comments and suggestions.
Using App Inventor Templates
by Keith Galli
When you use App Inventor, you need not build your projects starting from a blank page. Instead you can start from a template. Templates are partially-completed projects that you can import into your account. Templates can include blocks, user interface components, and media. Using templates can let you jump right in to developing the functionality of your app.
For example, a tutorial or lesson might start out by asking students to load a project template and then modify and extend it.
Templates are also great if you want to build extra features on top of a template app, and you don’t have the time to build the app from scratch.
Use a template as the basis of your project to get a head start.
1. In the development screen scroll to the top left of the page to your projects tab. In this tab you will see an option that says “import project (.aia) from a repository”. Click on this option.
2. Next you will see a screen that lists the templates that are built in to App Inventor. When choosing a template be sure to read the descriptions found on the right of the screen. Templates may contain projects with media only, with bugs for you to fix, that are fully completed, etc. so it is important to read carefully.
3. Select the template that fits your projects needs and click “OK” (if you don’t see a template that fits your project’s needs read the sections below).
4. Now when you go to your my projects tab you will see the template file listed. Click on its title to open the project.
5. This file will contain uploaded media files, a Designer viewer populated with visible and non-visible components, and possible pre-assembled blocks and features depending on which template you selected. You should test the template by using it with the Emulator or your android device with the AI Companion App. For instructions on how to get started with this or any App Inventor project, see http://appinventor.mit.edu/explore/sites/all/files/hourofcode/AppInventorTutorials.pdf.
App Inventor has a small number of built-in templates, which you can use as explained above, by selecting “Built-in Templates” from the drop-down menu that appears when you ask to import a project from a repository. You can also load templates from Template Libraries that other people have created and made available on the Web.
To access one of these libraries, select “Add new template repository Url” from the dropdown menu, and fill in the URL for that library.
and fill in the URL for that library.
The screen will show you the templates in that library, and you can select one.
As an example, try using
http://appinventor.cs.trincoll.edu/csp/week1/
which is the URL of a library at Trinity College for week one of their App Inventor Computer Science Principles (CSP) course.
Once you’ve added a template library, it will be remembered in you App Inventor account, and will appear as a selection in the dropdown menu.
An App Inventor Template is really nothing more than a partially complete project, including whatever components, complete blocks, partially completed blocks, and media that the template author cares to provide. To create a template, just build (part of) an app in the usual way, save export the source (aia file) and make that available to people to use. If you are preparing several templates for a class, or for pubic distribution, you might want to organize these into libraries, also known as template repositories. See Creating App Inventor Template Repositories for information on how to create your own repositories.