Magic 8-Ball is a mobile version of the classic fortune-telling game. A user can ask a question, shake the phone, and hear the magic 8-ball’s prediction. This app uses the Accelerometer to handle the shaking event and the TextToSpeech component to have the phone speak the prediction, which is randomly selected from a list of predictions.
- Create an App that uses the Accelerometer sensor to respond to shaking events.
- Learn how to use the TextToSpeech compenent to convert output to speech
- Randomly select the 8-Ball's responses from a List Variable.
- Add enhancements to the project that use the Speech Recognizer component.
Magic 8-Ball Tutorial
Follow the video tutorial to build an initial version of the Magic 8 Ball App. To begin the lesson open App Inventor with the Magic 8 Ball template. It provides the media you need for this project and a partial version of the User Interface. When the project opens -- be patient, it may take a moment -- use the Save As option to rename it Magic8Ball.
Magic 8-Ball Mini-ProjectsNow that you've finished the tutorial, it is time to work on some creative projects. Work with your partner at implementing the following changes to the Magic 8 Ball App. Click here or on the Mini Project Link in the Assignments tab to download the PDF instructions.
Make sure that you do the Magic 8 Ball Self-check at this link and that you update your Google Site Portfolio