Device Plugin Library

Dylan Segna

I have finished compiling the native Android version of the bluetooth device plugin library.
Available for download here: https://cdot.senecacollege.ca/hg/seneca-health-native/raw-file/4c88796b9ce7/libs/NexjDevicePlugin.jar

To use it in an application, you need to do the following:

Create a class that extends CordovaActivity and implements MedicalDeviceActivity
ex. public class DemoActivity extends CordovaActivity implements MedicalDeviceActivity{}

The class should have two member variables, MedicalDevicePlugin and CallbackContext.
Both take the calling activity as the parameter for their constructors.

You can now call plugin.execute() to execute various bluetooth commands.
The commands and how to execute them are:

JSONArray params = new JSONArray();
plugin.execute(“enable”, params, callbackContext);
plugin.execute(“disable”, params, callbackContext);
plugin.execute(“getBonded”, params, callbackContext);

JSONArray params = new JSONArray();
JSONObject param = new JSONObject();
param.put(“brand”, “brand_name”);
param.put(“input”, new JSONArray());
param.put(“num”, NUM_MEASUREMENTS);
param.put(“time”, SECONDS_BEFORE_CANCELLING);
param.put(“type”, “device_type”);
param.put(“address”, “”);
param.put(“serial”, “”);
params.put(param);
plugin.execute(“connect”, params, callbackContext);

JSONArray params = new JSONArray();
JSONObject param = new JSONObject();
param.put(“brand”, “brand_name”);
params.put(param);
plugin.execute(“disconnect”, params, callbackContext);

When the plugin has…

View original post 52 more words

Working on HealthFirst MyOscar integration

After finishing with the graph plot of data generated

I am working on a new feature for Healthfirst. I am collecting and uploading medical metrics (heart beats) to myoscar web services. I worked on gathering medical data metrics such as:
– Heart beats per minute.
– Number of seconds that the heartbeat going over the threshold.
– Threshold set

I will be storing it in the “Other Health Trackers” category in myoscar. I have a prototype and I’m experiencing errors using the myoscar client.

Thanks,
Zak

Simple Data Uploader App Update

I made changes to the design of the Simple Data Uploader App so that the screens look more generic and the application also retrieves the list of paired devices. The blood pressure monitor screen has one of the devices selected below (which happens to be the blood pressure monitor) and also has text within a scrolling view underneath that list (not a ScrollView). Notice how the text for instructing the developer how to connect devices at the top of the scrolling view is chopped (I scrolled in such in a way that it would be visible in the screenshot).

Updated Version

The other screens also look very similar and all of them will also eventually connect to MyOSCAR.

Simple Data Uploader App

I have started designing the UI for the Simple Data Uploader App and I have managed to come up with a design using the graphical XML tool on ADT Eclipse. Here are some screenshots below:

A&D Weight Scale

A&D Blood Pressure Monitor

BluGlu Bluetooth Dongle

Polytel Bluetooth Dongle

This application will in the future be able to take any medical device readings and push it to MyOSCAR.

MMDI – The Integration of Polytel GMA Device

In the past week, a progress has been made – the Polytel GMA device was integrated into the MMDI project. With the integrated Polytel GMA device, the blood glucose readings from LifeScan oneTouch Ultra, Ultra 2 or UltraMini glucose meters can be transferred to Android (PhoneGap) devices using Bluetooth wirelessly.

tmp

This is another integration of Bluetooth adapter for LifeScan blood glucose meter products. The first integrated Bluetooth adapter for our MMDI project is the bluglu device, which can work with OneTouch UltraMini blood glucose meters.

Demo MMDI – Migration to Java Update

Managed to populate the list of paired devices. Here is what I had to do:

  • Copied the Bluetooth classes into this project.
  • Removed files that are no longer required. For example command files are used to call Java from JavaScript.
  • Added the BluGlu JAR file.
  • Removed references to Cordova. However, some of the methods have to be modified accordingly. All of these have been marked with a todo.
  • Added Bluetooth security permission to the manifest file.
  • Populated list of paired devices with the device names.

This code has been checked into the following repository: https://aminassian@bitbucket.org/aminassian/demommdijava