Outline 1/3 PHA Client

21
Outline 1/3 PHA Client 1.Overall Architecture 2.Client PHA Setup 1. Open ADT 2. Edit Android Properties Android 4.4.3 API 17 3. Setup Android Virtual Device (AVD) 4. Restart ADT 5. Run PHA as Android Application (up to 5 min first time) and enter account information. 6. You many need to restart PHA.

description

Outline 1/3 PHA Client. Overall Architecture Client PHA Setup Open ADT Edit Android Properties  Android 4.4.3 API 17 Setup Android Virtual Device (AVD) Restart ADT Run PHA as Android Application (up to 5 min first time) and enter account information. You many need to restart PHA. - PowerPoint PPT Presentation

Transcript of Outline 1/3 PHA Client

Page 1: Outline 1/3 PHA Client

Outline 1/3PHA Client

1. Overall Architecture2. Client PHA Setup

1. Open ADT2. Edit Android Properties Android 4.4.3 API 173. Setup Android Virtual Device (AVD)4. Restart ADT5. Run PHA as Android Application (up to 5 min first

time) and enter account information.6. You many need to restart PHA.

Page 2: Outline 1/3 PHA Client

Overall Architecture.

Client(Android

Application)Application Server DB

REST Interface

Microsoft HealthVault (MSHV)

HTTPRequest

http://cicats9.engr.uconn.edu:14080/Help/

RESTClient Tool

Page 3: Outline 1/3 PHA Client

Edit Android Properties Android 4.2.2 API 17

Page 4: Outline 1/3 PHA Client

Setup Android Virtual Device (AVD)

Page 5: Outline 1/3 PHA Client

Sign-In Page

Page 6: Outline 1/3 PHA Client

PHA Home Screen

Page 7: Outline 1/3 PHA Client

Outline (2/3) REST Client Tool

1. Install Google REST Client into your browser2. Sign in to MSHV to get public and record ID3. In headers add Content-Type: application/json4. Request method: POST5. Copy JSON string into the body

Page 8: Outline 1/3 PHA Client

Install Google REST Client

Page 9: Outline 1/3 PHA Client

Sign into MSHV

Page 10: Outline 1/3 PHA Client

Add Content-Type to HEADER

Content-Type: application/json

Content-Type: application/xml

Page 11: Outline 1/3 PHA Client

REST Client Tool

Page 12: Outline 1/3 PHA Client

Outline (3/3) PHA Code

1. Requirements2. Activity Sequence3. Code Review

Page 13: Outline 1/3 PHA Client

Requirements

• Internet connection• Within the engineering network

(vpn.uconn.edu)

Page 14: Outline 1/3 PHA Client

Activity Sequence

1. Login Activity (only one time)2. Splash Activity (get data from MSHV)3. Tabs Activity (load tabs layout into activity)4. Press Medication RXOTC Activity5. Press Add RXOTC-Form Activity6. Add meds and press Save RXOTC Activity

1. OnActivityResult()

7. Async Task MedicationPostRequest()

Page 15: Outline 1/3 PHA Client

RxOtcFormActivity.java

Page 16: Outline 1/3 PHA Client

RxOtcActivity.java

You have to edit other classes and add/edit methods for each health item.

Page 17: Outline 1/3 PHA Client

ServerConnection.java

Reuse or make this method generic for usage for other health items.

Page 18: Outline 1/3 PHA Client

ServerConnectionHelper.java

You have to edit this class and add/edit methods for each health item.

Page 19: Outline 1/3 PHA Client

MedicationPostRequest.java

Reuse or make this class generic for usage forother health items.

Page 20: Outline 1/3 PHA Client

Result can be check at:

1. Your PHA application2. https://account.healthvault-ppe.com

Page 21: Outline 1/3 PHA Client

General comments.

• Ask early, errors can occur on all different tiers (while MHSV is less likely).

• When you use intents, the keys have to be consistent! – “MedicationName” != “medicationname”

• When doing a REST Service the method name http://cicats9.engr.uconn.edu:14080/Help/

• Server model is in add-on v3 (sent today)