In this Instructable I will be teaching how to make a basic Magic 8-Ball App on MIT App Inventor 2. You won't have to download anything to make the app, and the website is free. The app you make will work best on Android Devices. If you don't have a Android Device you can download the Android MIT App Inventor Emulator to test your app.
Step 1: Components
The first step is to design your app. On designer drag the components in the picture above to your viewer. The names that appear in your components box may differ from mines because I renamed my components based on what they do. There are question marks the component options in the palette. If you hover your mouse over it a description of the component will appear.
1. Drag a button on to the viewer. This button will be the Magic 8-Ball. Change the image to one of a Magic 8-Ball. I have supplied two options-
2. In a Vertical arrangement (drag one into the viewer) place two labels change the text for each as follows-
Label 1- Ask the Magic 8-Ball a question
Label 2- Click or Shake the Magic 8-Ball...
(The click is covered by the button but the shake will be from the Accelerometer)
3. Drag a sound component into the viewer. This will provide a sound effect. Change the source to your sound effect. I used a Ta-Da Sound.
4. Lastly Drag an Accelerometer into the viewer.
Step 2: Programming
The great thing about app inventor is that you don't have to know how to
write programming languages to make an app. You just drag and drop components. Go to blocks and copy the blocks shown in the picture above. The pink blocks are just suggestions. You can fill in what you want in as many pink blocks as you want. Make sure both brown blocks have the same blocks inside them. Instead of making all the blocks over again for the Accelerometer you can left click on the blocks and copy them.
Step 3: Compare
The link below is for my completed game it is available for download (free) if you want to, but I'm mainly putting in the link so you can compare final products. If you have any suggestions or improvements, I would be happy to hear them in the comments.