Android - App Inventor
Objective #1: Download App Inventor
- Go to http://appinventor.googlelabs.com/learn/setup/ for the download of App Inventor. Choose instructions for which ever system you use and begin the download. Click “run” instead of save and for ease of access, do not change the location of the download.
- To access the download using a school computer, you need to create a shortcut to the file. So go to “My Documents,” right-click and create a shortcut. For the location copy and paste the location that the App Inventor gives you. This will allow you to access the App Inventor emulator.
Objective #2: Access the App Inventor emulator
- Go to the downloaded App Inventor folder via the shortcut you just created, and open the folder. Open commands-for-appinventor, and click on “run-emulator” next click on “emulator.” This will activate the emulator that you will use for the projects.
- If you possess an App Inventor approved Android phone, you can use that as your emulator.
Objective #3: Create a Google account
- If you already have a Google account, you can skip this step.
- In order for you to program via App Inventor, you need to have a Google account to save your work and to use a workplace.
- Go to Google Account Set-Up to create your account. Follow all of the steps to continue.
Objective #4: Utilize your App Inventor workspace
- Go to the App Inventor main site, from there click on “My Projects.” This is your workspace. From here you can create an application to help with furthering your education with Android development.
- To assign roles to the objects of the project, you need to click on “Open the Blocks Editor.” It will ask you to “Open” or “Save” the file, you will want to click “Open.” Java will prompt a warning, but click “Run.”
- The Blocks Editor allows you to assign roles to the objects of the application. Each property and method fits into each other like puzzle pieces.
Objective #5: Create a HelloWorld application
- Begin by opening App Inventor and going to “My Projects.”
- Add a new Button object by clicking and dragging a Button to the form.
- Off to the right of the screen are the properties of the object. Change the “Text” property to “Click Me!”
- You can change any of the properties for an object in this area.
- Next, add a Label object.
- Change the Text of the Label to “Surprise!”
- Click Save, and go to the Blocks Editor.
- When the Blocks Editor opens, click on “My Blocks.” This is where all of your objects are that you can assign methods to.
- Click on Button1 and click on Button1.click, then click Label1 on Label1.Text and connect this to the interior of the Button1.click method.
- Next, click on Built-In and choose the Text submenu. Then choose Text and connect that with Label1.Text. Click on the small arrow on the Text property that you just chose to change the name.
- Make sure you have your emulator running prior to running the application or else it will not run.
- Click on “Connect to Device…” and choose emulator####, App Inventor will then load the newly created application to the emulator.
- This video is another way to make an App Inventor application http://www.youtube.com/watch?v=t5o3bTMVDVw
Objective #6: Alternate to App Inventor
- An alternate that gives a prospective Android programmer a “boost” up on the rest of prospective programmers is Droid Draw.
- Although Droid Draw is just designing an interface, it gives novice and advanced Android programmers help on programming in XML. Droid Draw helps you with the design, placement, and properties of an interface.
- To use Droid Draw, go to the Droid Draw website. From here you can program an interface directly on the website or you can download the application. If you choose to download your own version of DroidDraw, you should Save it to your Desktop or (for school) in your My Documents folder. Otherwise, you can actually choose Run and use it directly from the internet which is easier and better than using the version on the website.
- To create an interface, you can choose from a variety of Layouts and screen sizes. Then you can click and drag the objects onto the interface and assign their properties in the Properties menu.
- After you create your interface, you click Generate in the upper left-hand corner which then creates the XML source code that you directly copy and paste into your project in Eclipse.
- The benefit of Droid Draw is that it gives you the XML source code that App Inventor does that supply you with. Another benefit of Droid Draw is that you can use Droid Draw instead of graph paper for a more accurate set-up of an interface.