Instructions for Andriod and pha; Microsoft HealthVault



Download 12.86 Kb.
Date21.06.2017
Size12.86 Kb.
#21408
TypeInstructions

Download Instructions for Andriod and PHA; Microsoft HealthVault





  1. Download/Install Android SDK: http://developer.android.com/sdk/index.html (choose Windows, Mac OSX, Linux, 32 or 64 bit). or see http://www.ibm.com/developerworks/opensource/tutorials/os-eclipse-androidwidget/index.html?ca=dgr-eclipse-1 for an approach that installs Eclipse with Android in multiple steps. We recommend that do a new installation even if you currently have Eclipse installed. This will allow all of the correct versions of the various applications and plug ins to be installed. Remember, the Eclipse installation is not like typical programs on a Windows platform; the install is simply an unzip to a directory, so you are allowed to install multiple versions of Eclipse on the same CPU as long as they use different directories. If you are doing an installation that augments one for Eclipse, please make sure that you define a different workspace. Your existing version of Eclipse will have a workspace defined such as: C:\Documents and Settings\Steve\workspace. Make sure that you define a new directory for the Android SDK install; the two Eclipse installs cannot share the same workspace. If you use the default in Extract the downloaded file into the C:\ directory. The extraction is essentially the install. Once extracted, you will have a directory C:\adt-bundle-windows-x86-20130729 defined. In the directory, run the SDK Manager.exe application which displays the screen below. Select the three boxes: Install Android SDK Build Tools 17, Install Documentation for Android SDK, Install Samples for SDK, and Install Android 2.3.3 to complete the installation process of the Android SDK. Note that SDK Manager.exe is in the directory: C:\adt-bundle-windows-x86-20130729 while ecpilse.exe is in C:\adt-bundle-windows-x86-20130729\eclipse. We suggest you make shortcuts to each of them on your desktop. Finally, note that in order to allow the Personal Health Assistant (PHA) mobile app to be executable within the Android SDK (Run  Run as  Android Application) you will need to make sure that there is an Android virtual device installed (see figure after the SDK at bottom of the next page). Make sure that you create a device for Android that has less than 750Meg or the simulator may have difficulty running.





  1. Loading PHA into Android SDK: The PHA archive is in filelocker (https://web2.uconn.edu/filelocker/) at UConn and has been shared to all of you via your NetID. Download PHA4.zip and extract to a specific directory. Startup the Andriod SDK. Once running, click on File  Import  Android  Existing Android Code into Workspace and select the directory that you downloaded and extracted PHA4. Point the root directory at this directory, and the PHA application will be loaded into eclipse and display in the Package Explorer. Right-click on the PHA4 project, Select Properties, Click Android, and Select Android 2.3.3, as shown in the screen shot below.

The importing of the PHA4 also includes the correct AndroidManifest.xml file which is one of the most important files in any Android project. AndroidManifest.xml specifies application wide information such as: identify the SDK version to use; define the permissions on the phone or mobile device; identify the first activity (home page) that should be started when the app starts; and, services for tasks that are done on a regular basis (e.g., rest request every 10 minutes).

Finally, you are almost ready to run the PHA application. Before doing so, you need to create a virtual Android device – select Window  Android Virtual Device Manger (see below) and then the New button. This will allow you to name and choose a device. Make sure you chose a device with less than 700 Megs of memory, or else you may have difficulty in running the device and Android app in the virtual machine (simulator). You are now read the run the Android application using: Right-click on the PHA4 project and then select Run As  Android Application. You can then swipe the virtual device and click on Main Menu and select PHA application. Please be patient – it may take a few minutes for all of this to start up. Note that if you are not running on the SoE network, you may not be able to access MS HealthVault; we are working to open a port to allow you to access our HealthVault server.

Upon a successful execution of PHA, the screen shown below will appear. Notice that Nexus_S is the virtual Android device.





  1. Resetting the Android Version: It may be necessary to reset the Android version to 10 so that the PHA software will compile with the correct version of Android (2.2.3). The PHA minimum version is 10 and must be specified in the AndroidManifest.xml file that is part of the project definition under “.settings” by adding this line . In the screen shot below, you can see the box for doing this activity. You need to use an earlier version of Android since some of the PHA APIs has been deprecated.

You will run PHA in the Android simulator by clicking at the “Android Virtual Device Manager” button. Then you are able to create a new virtual device using the “New” button at the top right corner. You only need to perform this action once (unless you want to test the code on different virtual devices). This opens a new window which contains a list of devices from which you can select. Once created, Eclipse allows you to select it from the drop down menu for the next time as illustrated below.





  1. Hello World Application: Develop a Hello World Android application to familiarize yourself with Android and its compilation and execution environment. To do so, first create an Android Application Project (File -> New -> Android Application Project) and other project creation steps. This generates documentation that you must understand in order to work with the important aspects for all android projects (AndroidManifest.xml, gen folder, res folder and the res/layout/activity_main.xml --> home page). There is a significant amount of code automatically generated, and you need to understand the skeleton of an Android application. Make sure you select Android 2.3.3 by clicking Project -> Properties -> Android -> click Android 2.3.3. Note that a more comprehensive documentation for the Hello World is at: http://developer.android.com/training/basics/firstapp/index.html



  1. Microsoft HealthVault Account Creation (MSHV): Create an MSHV (https://www.healthvault.com/us/en) – enter information on yourself (you can use a fake address and will have to create an email). In addition fill out information on weight, height, and other basic demographics, and put in a few medications (over the counter or fake prescription medications.





Download 12.86 Kb.

Share with your friends:




The database is protected by copyright ©ininet.org 2024
send message

    Main page