Magic 8 ball

Magic 8-Ball Predicts the Future

This page will guide you through building a “Magic 8-Ball” app with App Inventor 2 It is an app that models the magic 8 ball toy. Initially, the app should have the image of the 8 ball front, then when the person shakes the phone, the answer should appear from a list. The Magic 8 Ball is a fortune telling toy. It is a plastic ball with an 8 on the front. The player thinks of a yes-or-no question and shakes the ball, then turns it over to reveal the answer. Inside the ball is a 20-sided die floating in liquid. The die floats to the top; the back of the toy is a clear window that shows the top side of the die, with one of the responses. When activated, your 8-ball will deliver one of its classic predictions, such as “It is decidedly so” or “Reply hazy, try again.” Full tutorial for Magic 8 ball

Learning Goals

After completing this app, you will be able to:
  • Navigate the App Inventor environment: designer, blocks editor, emulator and/or physical phone
  • Correctly use the following App Inventor components: accelerometer sensor, button, sound
  • Correctly use the following App Inventor concepts: making and using a list, responding to an event

The best way to predict the future is to invent it (Alan Kay)