09/02/15 - Blog Post 2
Magic 8 Ball App.
This week in our second lab we created an App called Magic8ball. The app was pretty much exactly what it sounds like, it was a picture of a magic 8 ball on the screen that gave you one of eight predictions when you click a button. It also made a sound when you did this.
Shane first did a demonstration on how to make it and then we were told to do it buy ourselves with the instructions provided. The instructions were pretty straight forward so it wasn't too difficult.
We began by downloading a picture and a sound file for the app and then re uploading them to MIT app Inventor, we had done this last week with the 'pet the kitty' app so this was easy enough to do. We then had to insert labels so as to give the user of the app instructions what to do. When all of that was done the designer page looked like this.
Next we moved onto the blocks which is how we programme the app to behave when the button is clicked. This was a little bit trickier then last week as there were more factors to take into account then with the 'pet the kitty' app. This involved connecting the act of clicking the button to the sound file and then picking at random an answer from a possible eight suggestions. When the Blocks were completed they looked like this.
There was a part in the instructions which allowed you to make the magic 8 ball respond to the phone being shaken as oppose to clicking the button however as I was using an emulator I could not do this.
Overall I found this task enjoyable and I think it will help us in creating our apps in the coming weeks.



No comments:
Post a Comment