Creating the companion app
Now, let's take a look at the mobile project. From the PACKT publishing downloaded code, open the project IoT-Quiz_client.xdk
, located inside the folder with the same name.
This project contains the mobile companion app, built using HTML5 and Cordova, and also with the help of the Intel App Framework (http://app-framework-software.intel.com/api.php).
Interface
Using the drag and drop visual editor, we created the following page structure:
Each of the following "pages" were built for specific game events:
#mainpage: This is the landing page. This view displays the form to insert the Galileo Socket.IO server IP address.
#join_game: In this view, we'll enter our name. After submitting it, we'll join the game or be alerted that the game has already started.
#waiting_players: It is displayed while a player is waiting for the game to start.
#question_view: Here, questions and answer options will be displayed.
#scores: This last page lists the players' game scores.
All the HTML...