The HTML of this app contains images and button DIV elements that are used to display the pictures taken with the camera and interact with the application. Touching the button DIV element triggers the takepicture function found in js/main.js.
If the camera app successfully takes a picture, the intel.xdk.camera.picture.add event is thrown. If the user cancels out of the camera application without taking a picture, the intel.xdk.camera.picture.cancel event is thrown instead. In case the application tries to query the camera object while the app's native camera is loaded, the intel.xdk.camera.picture.busy event is thrown. In each of these cases, the onSuccess function acts as an event handler.
The onSuccess event handler reads whether the camera application successfully took a picture or not. In case of an error, the message returned is displayed in an alert box. If the camera was successful, the image URL is used to draw the image to the screen.
After three images are captured with the camera, a quick slide show can be displayed using the makeslideshow function.