Coding
This app consists of two initializers and four event handlers. This first initializer sets the "global predictions" variable to a list with eight different responses. The second initializer sets the "global Feedback_Type" to nothing. The first event handler is triggered by touching the list picker button. When the list picker button is touched, the list picker opens. The second event handler starts when something is picked from the list. The global Feedback_Type is set to the list picker selection and the list picker text is set is set to the selection as well. The third event handler is triggered by shaking your phone, using the accelerometer sensor. This causes the speech recognizer to turn on. The final event handler starts whenever the speech recognizer recognizes speech. The "LabelAnswer's" text will change to a random item from the global predictions list. Then the app evaluates if the Feedback_Type is "Speak", if it is then the LabelAnswer's text will be spoken, if it is not then the app evaluates if the Feedback_Type is "Sound", if it is the it will call the sound to play. If the Feedback_Type is neither "Speak" nor "Sound" then the label will appear with no audio. |
magic8ball.apk | |
File Size: | 1599 kb |
File Type: | apk |
magic8ball.aia | |
File Size: | 77 kb |
File Type: | aia |