Chapter 6
Setting up the Development Environment

Now that we have settled on the major ideas behind our HiTL application, it is time to begin the actual implementation. To do so, we first have to set up the proper development environment. Please note that this tutorial was devised from within a Windows 7 OS and, as such, most screenshot images refer to this OS. Nevertheless, the tools used for these tutorials should also support most Linux distributions, Windows 7, 8, and 10, as well as MacOSX.

In the current chapter we will go through the various phases needed for setting up the development environment. These comprise installing the Android software development kit, cloning the HappyWalk Android project, deploying the server, and testing the basic sample app. The following sections describe each of these phases in detail.

6.1 Installing Android Studio

Android applications are developed through Android Studio (AS). This tutorial was written using version 2.1.3 of AS and, as such, we strongly recommend downloading and using this version since newer versions may introduce discrepancies and incompatibilities. In this section we will perform the necessary tasks to properly install this IDE, including installing the Java SE Development kit, AS, and Android SDK.

At the time of writing, AS 2.1.3 requires the Java Development Kit (JDK) 7; in particular, we used Java SE Development Kit 7u79, which can be downloaded from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html. From the JDK, we will need the Development Tools and the Public JRE, as shown in Figure 6.1.

Snapshot showing Installing Java SE Development Kit 7u79 screen.

Figure 6.1 Installing Java SE Development Kit 7u79.

After installing the JDK, the installation of AS 2.1.3 requires the reader to visit the page http://tools.android.com/download/studio/builds/2-1-3, and download the Windows bundle with SDK installer package. Alternatively, it is also possible to download a zip package appropriate for other operating systems; however, in doing so, the reader becomes responsible for manually setting up the necessary environmental variables.

After downloading and running the bundle's executable, AS should begin its installation. As shown in Figure 6.2, the reader needs to install the Android SDK (by ticking the appropriate checkboxes, if needed). The Android virtual device, while useful for testing many types of applications, is not sufficient for this tutorial. Since we require the accelerometer, location and microphone sensors, the use of a real device is strongly encouraged.

Snapshot showing Installing Android Studio and Android SDK screen.

Figure 6.2 Installing Android Studio and Android SDK.

After its installation is complete, AS may greet the reader with a Missing SDK window. As shown in Figure 6.3, we can safely cancel this setup wizard since we will be installing the necessary SDK by ourselves. Notice the update notification in the upper-right corner of the window; we advise the reader not to update, as newer versions introduce incompatibilities.

Screenshot of Canceling the setup wizard.

Figure 6.3 Canceling the setup wizard.

When you finally see AS's welcome screen, open the Android SDK manager by clicking on Configure and then SDK manager, as shown in Figure 6.4.

Screenshot of Opening the Android SDK manager.

Figure 6.4 Opening the Android SDK manager.

You should see a window similar to the one shown in Figure 6.5. Since in this tutorial we will be using Android API level 21, tick the corresponding checkbox as shown in Figure 6.5, and click the OK button to let AS install the associated components.

Screenshot of Installing Android API 21.

Figure 6.5 Installing Android API 21.

Afterwards, open the same window and click on Launch Standalone SDK manager, as highlighted in Figure 6.6.

Screenshot of Opening the standalone SDK manager.

Figure 6.6 Opening the standalone SDK manager.

On the Standalone SDK manager, check the box corresponding to Android SDK Build-tools 21.1.2, just as Figure 6.7 shows. We will need these Build-tools to compile HappyWalk properly.

Screenshot of Installing Android SDK Build-tools 21.1.2.

Figure 6.7 Installing Android SDK Build-tools 21.1.2.

Table 6.1 summarizes the steps we have taken so far.

Table 6.1 Summary of the steps necessary to install AS 2.1.3

Step Summarized Objective
Install JDK Installed JDK 7u79 from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Install AS 2.1.3 Downloaded and extracted the AS package from http://tools.android.com/download/studio/builds/2-1-3
Install Android SDK Used the SDK Manager to install Android API 21 and Build-Tools 21.1.2

6.2 Cloning the Android Project

In this section we will fetch and set up HappyWalk's base client application code. To do so, we will install Git, check out the HappyWalk client project, run the application for the first time, discover our Android debug key, and obtain a Google Maps Android API key.

The base HappyWalk app is available through Git1. As such, you will need to install an appropriate Git distribution for your OS. You can download the appropriate Git release for your OS from http://git-scm.com/downloads. This tutorial was developed using Git version 2.7.1.2 for Windows, although it should also work with newer versions. We will now demonstrate how to properly install Git on Windows 7. Make sure to adapt these steps to your own OS.

After running the installation package, choose a folder to install Git on. Make sure to add Git to your PATH system variable so that AS can find and use it! On the Git Windows installation, this can be done easily by choosing the option Use Git from the Windows Command Prompt (see Figure 6.8a). We also recommend choosing the options Checkout Windows-style, commit Unix-style line endings (see Figure 6.8b), Use MinTTY (see Figure 6.9a), and uncheck Enable file system caching (see Figure 6.9b).

Screenshot of Installing Git #1. (a) Adding Git to the PATH, onWindows (b) Choose Checkout Windows-style.

Figure 6.8 Installing Git #1. (a) Adding Git to the PATH, on Windows (b) Choose Checkout Windows-style.

Screenshot of Installing Git #2. (a) using MinTTY (b) Uncheck Enable file system caching.

Figure 6.9 Installing Git #2. (a) We recommend using MinTTY (b) Uncheck Enable file system caching.

Now that Git is installed, let us import the HappyWalk project in AS. From the welcome screen, click on Check out project from Version Control c06-math-001 Git as indicated in Figure 6.10 and fill the correct repository URL, as shown in Figure 6.11. Pick a Parent Directory of your choosing, but please take note of its location.

Screenshot of Importing HappyWalk from Git.

Figure 6.10 Importing HappyWalk from Git.

Screenshot of Cloning the HappyWalk project.

Figure 6.11 Cloning the HappyWalk project.

After AS clones the project, it should ask you if you want to open the checked-out Studio project file. As shown in Figure 6.12, respond “No” and, instead, select “Open an existing Android Studio Project”). Select HappyWalk's directory from the previously chosen Parent Directory, as shown in Figure 6.13. As AS loads the project it is likely that a “Gradle Update” and a “Gradle Plugin Update” window to appear, in which case you should answer “Don't remind me again for this project” to both (see Figure 6.14).

Screenshot of Opening the HappyWalk project.

Figure 6.12 Opening the HappyWalk project.

Screenshot of Choosing HappyWalk's project folder.

Figure 6.13 Choosing HappyWalk's project folder.

Screenshot of Do not upgrade Android Gradle or its plugin.

Figure 6.14 Do not upgrade Android Gradle or its plugin.

After AS finishes the project load process we can begin our deployment. The project's structure follows the general architecture presented in Section 5.2. As previously mentioned, HappyWalk's MapsActivity will serve the purpose of showing nearby POIs and displaying collaborative data from all users, in order to provide near real-time mood context. However, in order to use Google Maps within this activity, we must first perform some additional steps.

First of all, we first need to run our application at least once. This will allow AS to generate the necessary debug certificates. We can launch our Android application by making sure that app is selected from the dropdown list near the small Android logo and by clicking on Run app (the green “play” button), as shown in Figure 6.15.

Screenshot of Running HappyWalk.

Figure 6.15 Running HappyWalk.

Make sure your device appears on the Select Deployment Target window. In the Windows operating systems, this may require installing the appropriate Android Debug Bridge drivers for your device. For more information on this, check the Android Developer's website.2 If AS was able to properly install the application on your device, you should see a screen similar to what is shown in Figure 6.16.

Screenshot of HappyWalk's first launch.

Figure 6.16 HappyWalk's first launch.

Notice that Figure 6.16 shows an empty map screen. To use Google Maps, the reader needs to acquire his/her own Google Maps Android API key. To do so, a Google Account is required and it is also necessary to find the development computer's Android Debug Key. Figure 6.17 shows how this may be accomplished from within AS. With the HappyWalk project open, first open up the Gradle right-side panel (1). Click on its refresh button (2) and double-click on “happywalk/happywalk(root)/Tasks/android/signingReport” (3). The required SHA1 key takes the form XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX and shall appear on the Run console, at the bottom (4).

Screenshot of Obtaining the Android debug key.

Figure 6.17 Obtaining the Android debug key.

We cannot guarantee accurate instructions for the next few steps, since they may have changed by the time the reader is following this sentence. At the time of writing, the reader could follow the link below, replacing the XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX on the URL with the SHA1 acquired above:

https://console.developers.google.com/flows/enableapi?apiid=maps_android_backend&keyType=CLIENT_SIDE_ANDROID&r=XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX%3Bhitlexamples.happywalk

Here, the reader should be able to log in to his/her own Google Account and follow the provided directions to acquire a Google Maps Android API key. This involves creating a project (Figure 6.18), creating a new Android API key (Figure 6.19), and obtaining the mentioned key (Figure 6.20).

Screenshot of Creating a project to obtain a Google Maps Android API key.

Figure 6.18 Creating a project to obtain a Google Maps Android API key.

Screenshot of Creating the Google Maps Android API key.

Figure 6.19 Creating the Google Maps Android API key.

Screenshot of Obtaining the Google Maps Android API key.

Figure 6.20 Obtaining the Google Maps Android API key.

In case the above instructions do not work, we advise the reader to search for the Google Console Developers page.3 Either way, the reader should be able to log in to his/her own Google Account and follow the provided directions to acquire a Google Maps Android API key. At the end, Google should provide a development key free of charge (it starts with “AIza”).

Let us now use the key by looking into the contents of the HappyWalk's file app/debug/res/values/google_maps_api.xml. To do so, it is easier to view the entire project using the project tab's Project view. By default, it should be set in Android view; you can change the project tab's view by clicking on the buttons shown in Figure 6.21. In this perspective, navigate to and double-click the app/debug/res/values/google_maps_api.xml file, as shown in Figure 6.22. As soon as you double-click google_maps_api.xml, you should see the following contents:

Screenshot of Changing into the project's view.

Figure 6.21 Changing into the project's view.

Screenshot of Opening app/debug/res/values/google_maps_api.xml.

Figure 6.22 Opening app/debug/res/values/google_maps_api.xml.

c07f001

In place of YOUR_KEY_HERE, your google_maps_api.xml should contain your own development key. Once the proper Google Maps API key is in place, we can fully utilize the Maps interface on our application.

Table 6.2 summarizes the steps we have taken in this section.

Table 6.2 Summary of the steps necessary to set up HappyWalk's Android project

Step Summarized Objective
Install Git Installed Git for Windows from http://git-scm.com/downloads
Clone HappyWalk's Android project Imported and opened HappyWalk's client project from https://git.dei.uc.pt/dsnunes/happywalk.git using AS
Launch HappyWalk Used AS to run HappyWalk's Android application on a real device
Discover the debug key Used AS's signingReport task to discover the computer's SHA1 Android debug Key
Acquire a Google Maps Android API key Logged into the Google Console Developers page and used the debug key to acquire a Google Maps Android API key
Place the Google Maps Android API key Navigated to the google_maps_api.xml file and replaced the Google Maps Android API key

6.3 Deploying the Server

As previously discussed in Section 5.2.2, to compile and use our server, we will be using the following technologies:

  • PostgreSQL 9.3, for hosting our database
  • Eclipse Mars IDE for Java EE Developers
  • Apache Tomcat 7.

As we also mentioned in Section 5.2.2, the server needs to communicate with Foursquare® to acquire POI information. Therefore, the machine hosting it needs to have an active Internet connection. This is essential for the proper functioning of the HappyWalk system.

In the next section we will perform the necessary tasks to properly install Eclipse Mars and PostgreSQL, import HappyWalk's server project, obtain a Foursquare® client ID and secret, set up the database, and deploy the server on Tomcat 7.

6.3.1 Installing the Software and Cloning the Server's Project

Installing the Eclipse Mars is trivial; visit https://eclipse.org/mars/, download the Eclipse IDE for Java EE Developers package, and extract it to a location of your choice.

As for PostgreSQL, browse to http://www.postgresql.org/download/ and download the appropriate 9.3 installer for your OS. Several installers are available in http://www.enterprisedb.com/products-services-training/pgdownload. During installation, make sure to take note of the superuser password that is requested in the screen shown in Figure 6.23, we will need it later on. Uncheck Launch Stack Builder at exit, as it is not necessary (Figure 6.24).

Screenshot of Choosing PostgreSQL superuser's password.

Figure 6.23 Choosing PostgreSQL superuser's password.

Screenshot of stack Builder exit.

Figure 6.24 No need to launch Stack Builder.

After installing both of these tools, open the Eclipse Mars IDE and select a path of your choice for the workspace. Then, import a new Git project by clicking on File c06-math-002 Import c06-math-003 Git c06-math-004 Projects from Git. You should see a window similar to the one in Figure 6.25.

Screenshot of Clone from a URI.

Figure 6.25 Clone from a URI.

Select Clone URI and then fill the URI field, as shown in Figure 6.26. The Host and Repository path fields will then be automatically filled.

Screenshot of Introduce the URI corresponding to HappyWalk's server.

Figure 6.26 Introduce the URI corresponding to HappyWalk's server.

Afterwards, just select the master branch (Figure 6.27) and select master as the initial branch, origin as the remote name, and choose a directory to save the project (Figure 6.28).

Screenshot of Select the master branch.

Figure 6.27 Select the master branch.

Screenshot of Selecting the local storage directory.

Figure 6.28 Selecting the local storage directory.

Eclipse will begin to receive the objects associated with our server. We now need to tell it to import the Eclipse project (Figures 6.29 and 6.30).

Screenshot of Select the option Import existing Eclipse projects.

Figure 6.29 Select the option Import existing Eclipse projects.

Screenshot of Tick the checkbox of the HappyWalkServer project.

Figure 6.30 Tick the checkbox of the HappyWalkServer project.

6.3.2 Obtaining a Foursquare®'s Client ID and Client Secret

Now that we have cloned the HappyWalk Server project, we will need to make a few modifications to the server's code. First, we will need to create a Foursquare® Client ID and a Client Secret.

Browse to the address https://developer.foursquare.com/. The steps herein described are valid for the version of the Foursquare® website available in the beginning of 2016. We cannot account for future changes in website design but, hopefully, the functionality will remain the same for the foreseeable future.

First, click on My Apps and create an account (if you do not already possess one). After that, click on the button that says Create a new app. Fill the Your app name and Download / welcome page url fields as you desire. You can leave the other fields empty, as they are not relevant for our purposes. Afterwards, click on Save changes, shown in Figure 6.31. Now, when you navigate into the MyApps menu, Foursquare® will provide you with a Client ID and a Client Secret (Figure 6.32), which we will need in our server.

Screenshot of Creating a Foursquare®app.

Figure 6.31 Creating a Foursquare® app.

Screenshot of Foursquare®'s Client ID and Client Secret.

Figure 6.32 Foursquare®'s Client ID and Client Secret.

To do so, use Eclipse's Project Explorer to browse and double-click the src/utilities/GlobalVariables.java class, as shown in Figure 6.33.

Screenshot of Navigating into the server's GlobalVariables.

Figure 6.33 Navigating into the server's GlobalVariables.

c07f001

Here, it is necessary to replace the FOURSQUARE_CLIENT_ID and FOURSQUARE_CLIENT_SECRET strings with the values provided by Foursquare®, from the page shown in Figure 6.32.

6.3.3 Setting up the Database

Now, let us set up our PostgreSQL database. To do so, we will use the pgAdmin III tool which usually accompanies a PostgreSQL installation. If, for some reason, you are unable to use pgAdmin, it is also possible to create our database using the command line as we will show later on.

Using pgAdmin III, we first login by double-clicking on the PostgreSQL 9.3 server, highlighted by the circle in Figure 6.34. When the login menu pops up, use the superuser credentials obtained during the installation step shown in Figure 6.23.

Screenshot of Log in to the PostgreSQL 9.3 server.

Figure 6.34 Log in to the PostgreSQL 9.3 server.

Afterwards, right-click on Databases and select New Database, as shown in Figure 6.35. Name the database “happywalk” and set its owner as your superuser (by default, it should be postgres; see Figure 6.36).

Screenshot of Create a new database.

Figure 6.35 Create a new database.

Screenshot of Naming the new database as happywalk.

Figure 6.36 Name the new database as happywalk.

After creating the database, we need to populate it. To do so, we will need to provide the database creation SQL file contained within the server's git repository. Since we have already fetched the project files using Eclipse, the root of our server's project files rests on the directory selected in the step depicted by Figure 6.28. To begin, click on the SQL button while having the happywalk database selected, as shown in Figure 6.37.

Screenshot of Selecting the correct SQL script.

Figure 6.37 Select the correct SQL script.

On the Query window that appears, go to File c06-math-005 Open and select the file located in4 <root of HappyWalk's server Git>/Database/HappyWalkDB.sql. Afterwards, click on the Execute Query button (shown in Figure 6.38). If everything went well, the server should output something akin to Query returned successfully with no result in xx ms. With this, our database is fully operational.

Screenshot of Populating the database.

Figure 6.38 Populating the database.

As an alternative to pgAdmin III, you can also create the database through the command line. To do so, you need to either have the PostgreSQL binaries in your PATH system variable or navigate to <PostgreSQL's installation folder>/9.3/bin/ from the command prompt. Afterwards, just use the following command:

createdb -U <your superuser> -O <your superuser> happywalk

to create the database, and then the command:

psql -U <your superuser> -d happywalk -f <root of HappyWalk's server Git >/Database/HappyWalkDB.sql

to populate it.

Now that the database has been created, let us return to our server. In Eclipse, browse to the src/hibernate.cfg.xml file:

c07f001

Here, you will need to replace the hibernate.connection.password and hibernate.connection.username properties with your PostgreSQL superuser credentials (chosen in the step shown in Figure 6.23). If necessary, also adjust the hibernate.connection.url property to match your server's URL and PostgreSQL port. If you have been following this tutorial from a single computer without changing default installation values, you should be connecting to a local PostgreSQL server and, thus, the default URL and port should be localhost:5432. This information should match the one shown in pgAdminIII, next to the PostgreSQL 9.3 server (see Figure 6.34).

6.3.4 Deploying the Server on Tomcat 7

Finally, we need to deploy our server on Tomcat 7. To do so, let us define a new server on Eclipse through the menu File c06-math-006 New c06-math-007 Other c06-math-008 Server (Figure 6.39), where we choose a new Tomcat v7.0 Server (Figure 6.40).

Screenshot of Creating a new server.

Figure 6.39 Create a new server.

Screenshot of Defining a new Tomcat 7 installation.

Figure 6.40 Define a new Tomcat 7 installation.

Eclipse allows you to download and install the latest version of Apache Tomcat 7 from within the IDE. To do so, click on the Download and Install... button, as shown in Figure 6.41, and choose a folder to install the server on. If you get a grayed out Next button together with an error message saying Unknown version of Tomcat was specified, try to wait for a little while. Eclipse downloads Tomcat in the background (you can check the download progress in the bottom-right corner of Eclipse's main window) and it does not recognize the server until it has been fully downloaded.

Screenshot of Installing Tomcat 7 from Eclipse.

Figure 6.41 Installing Tomcat 7 from Eclipse.

Alternatively, you can also manually download Tomcat 75 and indicate its path to Eclipse.

Finally, add our HappyWalkServer project to the newly created server by selecting it and pressing Add > (figure 6.42) and then Finish.

Screenshot of Adding HappyWalk to Tomcat 7.

Figure 6.42 Adding HappyWalk to Tomcat 7.

Happywalk's server should now be ready to be run. To test the server, try to run it by pressing the Run as... button on Eclipse, choosing Run on server (Figure 6.43) and selecting the newly created Tomcat 7 server (Figure 6.44).

Screenshot of Running the HappyWalk server.

Figure 6.43 Running the HappyWalk server.

Screenshot of Selecting the newly created Tomcat 7.

Figure 6.44 Select the newly created Tomcat 7.

At the bottom of Eclipse's main window, click on the tab that says Console. If everything is correctly configured, you should see a window similar to the one presented in Figure 6.45, where the Console tab is highlighted by a circle. The bottom output of the console should read something similar to INFO: Server startup in xx ms. Do check the rest of the console's output for any exceptions being thrown during the server's startup, which would indicate a configuration issue. Do not be alarmed by a possible browser window showing an HTTP status 404, as it simply means that we are not running any web interface within our server.

Screenshot of HappyWalk server up and running.

Figure 6.45 The HappyWalk server is up and running.

Table 6.3 summarizes the steps we have taken in this section.

Table 6.3 Summary of the steps necessary to deploy HappyWalk's server

Step Summarized Objective
Install Eclipse Mars Downloaded and extracted the Eclipse IDE for Java EE Developers package from https://eclipse.org/mars/
Install PostgreSQL 9.3 Downloaded a PostgreSQL 9.3 installer by visiting http://www.postgresql.org/download/
Import HappyWalk's server Used Eclipse to import HappyWalk's server project from https://git.dei.uc.pt/dsnunes/happywalk.git
Obtain a Foursquare® client ID and secret Visited https://developer.foursquare.com/, created an account and a new app to obtain a Client ID and a Client Secret, and replaced the appropriate variables within the server's GlobalVariables.java class
Set up the database Used pgAdmin III to create a new “happywalk” database, populated this database using the project's HappyWalkDB.sql query, and updated the server's hibernate.cfg.xml file
Deploy the server on Tomcat 7 Used Eclipse to install Tomcat 7, added the HappyWalkServer project to it, and tested the server

6.4 Testing the Sample App

To finalize our preparatory work, we will now attempt to launch HappyWalk's base system. This involves allowing communication between the server and the Android app. As such, we will need to discover the server's IP address and set that information in the client application.

The exchange of information between the server and the Android client requires a communication channel between the machine hosting the server and your Android phone. This may be achieved within a local network (e.g. both devices connected to the same wireless network) or by having both devices connected to the Internet and knowing the server's public IP. Either way, as mentioned in Section 6.3, the server needs an active Internet connection, to communicate with Foursquare®.

In Windows 7 (and most other Windows operating systems), knowing your computer's IP address can be easily achieved through the command line. Click on the Start menu, on the search box type cmd, and open cmd.exe. On the command prompt type ipconfig and press the ENTER key. As shown in Figure 6.46, the command will display several IP addresses; in the example, this computer was connected to a router giving access to a WiFi network to which our Android phone was connected. Thus, in this case, we were interested in the IPv4 address, which represents the address of the computer within the local area network.

Screenshot of ipconfig command.

Figure 6.46 The ipconfig command.

The Linux and MacOSX operating systems have their own equivalent command for displaying IP information; typically, one can execute the ifconfig command in the terminal.

Figuring out the correct IP address to provide to HappyWalk is a process that is highly dependent on your network configuration. If your server and your Android phone can communicate through the Internet, you can use websites such as www.myipaddress.com to discover your server's external IP.

After taking note of the server's IP, we will need to set this information in our Android app. In AS, change back to the Android view, just like we did a while back to change to Project view in Figure 6.21, and open the file hitlexamples.happywalk/utilities/GlobalVariables.java:

c07f001

Change the field <IP_of_Server> within the URL variable to match the location of your server. Now, we should attempt to run HappyWalk once more by clicking on the Run app button (refer to Figure 6.15 back on page ??).

If both the server and the app have been properly configured and assuming that your Android device has an active Internet connection and location services enabled, you should see an image similar to the one presented in Figure 6.47.

Screenshot of HappyWalk's map screen.

Figure 6.47 HappyWalk's map screen.

During development and testing, remember that your device needs to have an active connection to the server and location services enabled. If it doesn't, the app will not work properly.

Table 6.4 summarizes the steps we have taken in this section.

Table 6.4 Summary of the steps necessary to test the base HappyWalk system

Step Summarized Objective
Ensure connectivity The server and the Android device must be able to communicate with each other, and the server needs an active Internet connection
Discover the server's IP Used the command line / terminal together with the ipconfig / ifconfig command to discover the server's IP address
Set server IP in Android app Edited the Android client's GlobalVariables.java class and updated the <IP_of_Server> field within the URL variable
Launch HappyWalk Launched both the server and the client and made sure that the map interface appeared on the Android device, together with POI information

6.5 In Summary..

In this chapter we prepared the development environment necessary to work on HappyWalk. We went through the various steps needed for setting up AS, the IDE that we will use to work on the Android client, and Eclipse, which is used to program our server. We installed Git and used it to import the base HappyWalk client and server projects. Additionally, we obtained a Google Maps Android API key, a Foursquare® client ID and secret, and added them to the necessary project files.

We also installed PostgreSQL, created a database, and populated it through an SQL query. We then deployed and ran our server using Tomcat 7. Finally, we made sure that the server machine and Android device could communicate, informed the client application of the server's IP address, and tested the base HappyWalk system.

Now that HappyWalk is up and running, let us begin our work towards transforming it into a fully fledged HiTL BCI system.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset