You are here


You will create an app that shows a picture of a cowbell in a button and when you click the button it will play a cowbell sound. You can also make the sound play when you shake the phone.

  • Ages: All
  • Rating: Easy
  • Time to complete: 30-45 minutes
  • What you should already know: nothing
  • What you will learn:
    • How to create a new project
    • How to add a button to the screen and upload an image for it. Buttons are user interface components that you can click on to trigger an event. You then create a program (set of blocks) that handles the event.
    • How to add a sound to the project and upload the sound file.
    • How to play a sound when a button is clicked. This is also called handling an event.
    • How to use the phone emulator to test your app.
    • How to use a connected phone to test your app.
    • How to use the accelerometer (tilt sensor - like in a Wii remote) to play a sound when you shake the phone.

If you want to skip step 1 (creating the user interface and uploading the media files) then download the project zip file from Then go to App Inventor at and go to the list of projects page (My Projects). Then click on More Actions > Upload Source. Pick the file and it will upload the Cowbell_Starter project. Enter the project and click Save As and save it with a different file name like "Cowbell". Then you can start at step 2 by clicking here.

Mark Guzdial took the picture of the cowbell and recorded the sound.