Lab 9 - gracie-miller/BAE305-S19 GitHub Wiki

Lab 10 - Android Programming

By: Gracie Miller and Rachel Rohrer

Summary

The purpose of this lab was to gain coding experience using coding blocks provided by the MIT App Inventor program. These blocks were to be used to create an app for an android phone. The app we developed simulated a MAD LIB. Much of the difficulty came from trying to manipulate and transfer lists from one screen to the next. Ultimately, we were not able to work out all the issues we ran into within the allotted time of the lab.

Materials

  • Android phone
  • Laptop
  • MIT App Inventor program

Assembly Procedures

The app consists of three screens. On the first screen, a list of text boxes that prompt a user to input certain types of words appear as well as a button to continue to the next screen. The screen as seen by a user can be seen below:

Screen 1 Layout

The coding blocks used to create this screen are shown below:

Screen 1 Blocks

On the second screen, another list of text boxes appears as well as two buttons: one to continue to the next page and another to view the previous screen. This screen as seen by the user is shown below:

Screen 2 Layout

The coding blocks used to create the second screen are shown here:

Screen 2 Blocks

On the third and final screen, the words that were entered into the text boxes from previous pages are organized into a short story. The final screen can be seen below:

Screen 3 Layout

The coding blocks used to create the final screen are shown below:

Screen 3 Blocks

.aia source code

Test Procedures

Testing procedures for this lab consisted of running the app on an android phone to ensure that all of the entered text appeared in the appropriate place on the final screen.

Test Results

Ultimately, not all of the entered texts appeared in the final screen as they were initially planned to. The words inputted on the first screen would appear as they should on the final screen, but

Discussion

The app was designed so that on the first screen that appears, the user would enter a word or short phase that corresponded with the part of speech that was given in the hint. On the final screen, a short story would be revealed with the words that the user entered (similar to a MAD LIB). This app could be used by anyone who can read.

On the first screen, a list was initialized so that when the user pushed the button to continue to the next page, all of the information they entered into the text boxes on screen 1 would be saved onto that list. On the second screen, another list was created which was appended and added to the end of the first list. This new list was to be saved when the user pushed the button to continue to the last page.

On the last page, all of the information that was entered on previous screens is called. It was supposed to be entered in the appropriate place within the mad lib.

In the process of creating this app, there was one primary issue that caused the app not to operate correctly. All of the information from the first screen was displayed correctly on the final screen. This can be seen on the Screen 3 Layout image above. However, the information that was entered on the second screen of the app was not stored and therefore not displayed correctly on the final screen. It was likely that we were using the blocks incorrectly and so not properly telling the program to append the list from screen 2 onto the list from screen 1. Unfortunately, there was not enough time allotted in the lab for us to be able to resolve this issue. If given more time, we would have been able to research the issue in more detail and hopefully find a solution to the problem.