Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 79 - 2617_JSSPS_C-7
P. 79

    Hintbot

                                                                                Select Android App (.apk) from the Build
                                                                              menu to create a file that can be installed on
                                                                                          an Android device.

                     After testing, ensure the app draws smoothly with your finger, changes colours with button taps and
                     clears correctly with the Reset button.

                     CREATING A SIMPLE AI-BASED APP

                     To create a simple AI-based app, follow these steps:

                     Step 1:  Create new project in the MIT App Inventor.
                              A Create new App Inventor project dialog box appears.

                     Step 2:  Type the Project name as AI_ChatBot in the text box and click the OK button.
                     Step 3:  Change the name of the screen to AI_ChatBot in the Title textbox, adjust AlignHorizontal
                              to Center:3 and AlignVertical to Top:1 in the Properties pane. Set the BackgroundColor to
                              Cyan.

                     Step 4:  Click on the User Interface component in the palette pane.
                     Step 5:  Drag and drop the Image into the phone screen.

                     Step 6:  In the Image1 section, set the Height and Width to 30%. Under Picture, click Upload File to
                              select the image, then click OK to confirm the changes.
                     Step 7:  Drag and drop the TextBox into the phone screen.

                     Step 8:  In the TextBox1 section, set FontSize to 14.0, Width to 80% and ensure Enabled and Visible
                              are checked in the Behavior section.

                     Step 9:  Drag and drop the Label between TextBox1 and Button1 on the phone screen.
                     Step 10:  In the Label1 section, set the FontSize to 14.0, TextAlignment to left: 0 and leave the Text
                              field empty.

                     Step 11:  Drag and drop Button into the phone screen.
                     Step 12:  In the Button1 section, set the BackgroundColor to Magenta, FontSize to 20 and TextColor
                              to White. In the Text field, enter Give Answer. Set TextAlignment to left: 0.

                     Step 13:  Drag and drop another Label into the phone screen.
                     Step 14:  In the Label2 section, set the FontSize to 14.0, TextAlignment to left: 0 and leave the Text
                              field empty.

                     Step 15:  Click on the Media component in the palette pane.

                                                                                                   App Development      77

| 74 75 76 77 78 79 80 81 82 83 84 |