I have a dream app inventor download
The goal of this site is to show people that they can create in this medium, that they can program software and contribute in today's highly digitized society. This tutorial will get you building an app in minutes! You don't need to install anything on your computer-- App Inventor runs in the cloud!
You will build the app on your computer and test it on your Android device. If you don't have a device, you can even test on an emulator. For your first app, you will build the I Have a Dream app. It has a picture of Martin Luther King and a play button that, when touched, plays the famous speech given to , on the steps of the Lincoln Memorial in After completing the first version, you will add an image of Malcolm X and one of his speeches, turning the app into a soundboard with these great leader's perspectives on the civil rights movement.
After going through this tutorial, you can use this app as a template to build soundboard apps on any topic. If you'd rather watch video, check out the video equivalent to this tutorial. With the new release of App Inventor App Inventor 2 you can start building apps within minutes. The best way to build apps is to have a computer, an Android device, and a Wi-Fi connection.
If you have these things, these setup instructions are for you. If you want to build apps using an emulator, or if you don't have a Wi-Fi connection, check out the setup page for App Inventor.
Once you're setup, come back to this tutorial. So let's get started. App Inventor is a browser tool, so you don't need to install anything on your computer. You also need to connect to the same Wi-Fi connection on both your computer and your device. To setup, perform the following:. After changing the title and background, the app should appear like this in the designer: and similarly on the device. Upload Media You have the skeleton of an app setup, so the next step is to load the media you will need into the app, both a picture of MLK and a sound file of his speech.
So far you have designed the user interface and also added a non-visible component to play the speech. At this point, if you test the app and click the Play button, nothing will happen. Now its time to program how the app responds to user input, in this case playing a speech when the user clicks a button. You program behavior in the Blocks Editor, so click on the Blocks button in the top area of App Inventor.
When the Blocks editor appears it lists all your components by name on the left side. As soon as you specify a behavior, you can test it on the device.
Touch the button. Does the speech start playing? Suppose you wanted to modify the app so that the user could start and stop the speech by clicking the same button. The behavior might be described as:.
This behavior does not fit as a simple when-do block. You will keep the when Button. Click event, but you will insert a conditional if-else block within it. Always test your app as you add new features. Test this one by clicking on the button. The text of the Button should toggle between "Play" and "Pause", and the speech should start and stop accordingly. You have just built your first app with App Inventor.
Open the Blocks editor. Note that the Button1. Click event and other blocks have been renamed based on your renames in the designer. First, focus on the MLK button.
The behavior we want is for the first click to start the speech, the next one pause it, next one start it, and so on. So you don't always want the same thing to happen when the button is clicked. To program this, you use an if-else block. If-else allows the app to ask questions, such as, "is the speech already playing? To code this, drag out an if-block from the Control drawer, then click on the blue "modifier" icon. The modifier allows you to add branches. In this case, there are two possibilities, start or pause, so set it up with the "then" branch and the "else" branch.
Place the if-else block in the event handler. Then drag out an MLKPlayer. This block is true if the speech is playing, false if not. If it is playing, you want to pause the speech, so drag out this block from MLKPlayer.
Start is called. In this code, you're seeing two new things, both fundamental to software. First is the conditional if-else block. Conditional blocks provide the mechanism for the app to ask questions, the basis of artificial intellgence. The second new thing is you are checking a component property in the blocks. You set a few properties in the designer e. Here you are checking the Player's IsPlaying property in the blocks.
For more on these fundamental topics, see these notes on conditionals and component properties. You want the Malcolm button to behave similarly to the MLK button, so copy-paste. Click event handler Copy and paste, using command-c and command-v on Mac ctrl-c and v on Windows. Using the upside down triangle widget, switch the copied blocks to refer to MalcolmPlayer instead of MLK.
Test this behavior. You should be able to start and pause the speeches independently. But what happens if you click MLK then Malcolm?
Do the speeches overlap? You just need to pause Malcolm when MLK speaks, and vice-a-versa. The final blocks for the app are shown above with the additional blocks circled. This app is simple, but indicative of the architecture of most apps. This one consists of two event handlers. Each event handler consists of an event a click in this case and a response which is a sequence of blocks they're executed in order. Some blocks in the response are only conditionally executed. So you've not only created an app, you've learned some programming lingo.
Next time your hanging out with your friends, smack talk a bit about "event handlers" and "if-else conditionals". For more conceptual background for this app, see the notes on event handlers, conditionals and component properties. I Have a Dream.
If you don't have a device, you can even test on an emulator This tutorial is meant as a starter app. Check out the app. Start at ai2. Import the starter app. Import the starter app into App Inventor. In App Inventor, click on Project Import and choose the file you just downloaded.
Check that the UI looks like the following: Zoom. Run the companion and connect your app to it Zoom. Check that your app appears on your device.
Open the Blocks editor to code the behavior. Drag out a Player. Start block. Test your app! Is your phone still connected? If so, tap on the picture of MLK. Does the speech play? Download the app to your computer. You've built your first app! SaveAs your app to a different name. Choose a smaller image for MLK Zoom. Add the picture of Malcolm X Zoom.
Add an Image of the two leaders Zoom. Add a second Player component then rename the components. Set the Screen title and background Zoom. Test this updated behavior to see if it works. Copy and paste the blocks for playing the MLK speech. Change the copy to work for Malcolm X. Test the behavior Test this behavior.
0コメント