Android Application For Mobile Health Monitoring Computer Science Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

In this project, we implemented a wireless technology using a hand-grip heart rate monitor commercialized by Vernier, and core body temperature as health vital signs. Both signals were integrated on student prototype breadboard National Instruments NI-ELVIS to implement local body area network (LBAN). The Vernier heart rate and temperature sensors implemented as LBAN with Bluetooth and Wireless Fidelity (WIFI) wireless technologies provided real-time monitoring of health vital signs for client-server connectivity and remote mobile retriever. The mobile unit improvised with android operating system (OS) provided additional capability to process and detect continuous physiological functions, for example exhaustion of an athletic subject or a patient presenting high fever.

Chapter 1: Introduction

The human heartbeat and body surface temperature were monitored in real-time by using Vernier's sensors interfaced to the NITM ElVIS, heart beat sensor and temperature sensor, respectively.

3.1.1 NI EIVIS

In this project, National Instruments Educational Laboratory Virtual Instrumentation Suite (NITM ElVIS) prototype breadboard was used with NITM Laboratory Virtual Instrumentation Engineering Workbench (LabVIEW) and two VernierTM Analog prototype connectors to the sensor for heartbeat and temperature, respectively. ELVIS is a hands-on design and prototyping platform that integrates the 12 most commonly used instruments - including oscilloscope, digital multimeter, function generator, bode analyzer, and more - into a compact form factor ideal for the laboratory or classroom applications. It connects to PC through USB connection, providing quick and easy acquisition and display of measurements. Based on NI LabVIEW graphical system design software, NI ELVIS offers the flexibility of virtual instrumentation and the ease of prototyping customized application.

3.1.2 Sensors

VernierTM hand-grip transmitter sensor, receiver sensor and isolated temperature thermistor sensor were used in this project to acquire the biological information and convert the electrical signal.

The electrodes of the Hand-Grip Heart Beat Sensor can capture the small electrical signals carried across the skin of a person each time the heart contracts, they will send the signal to a amplifier which is a device for increasing the power of a signal. Then, the signal will be filtered by a band-pass filter once the signal was converted to a digital signal by an Analog-to-Digital Converter. Then the radio frequency chip with an antenna will send out the a radio wave which carries the data signal.

In the receive block, a band-pass filter will be applied after receiving the radio wave and demodulating the radio wave to the baseband signal. The following amplifier will increase the power of this baseband signal and transmit the signal to the NITM ELVIS.

3.2 Process the Data

3.2.1 LabVIEW

NITM LabVIEW was used in this project for data acquisitions and analysis (heartbeat and body temperature, respectively). It is a platform and development environment for a visual programming language commercialized by National Instruments. The purpose of such programming is automating the usage of processing and measuring equipment in any laboratory setup.

3.3 Real time data streaming to Android device

While obtaining the data, LabVIEW will send the data streaming real time to the android device though the Bluetooth module.

3.3.1 Bluetooth

3.3.2 Android OS platform

Google Nexus S was used in this project as the android OS platform. The Google Nexus S is a smart-phone designed by Google and manufactured by Samsung Electronics. This android OS phone is designed to supply the newest android platform to application developers.

3.4 Analysis data and plot

This Android application will listen to LabVIEW to obtain the data stream, and then it will analyze the data and graphically plot the result.

3.5 Android device generate data file

This Android application will generate a data file which stores all the data received via Bluetooth module.

3.6 Upload data to server

The Android application will upload the data file to server. User can retrieve data by checking out the server webpage or using android application to download data file.

3.7 Download data from server

Doctors can download data file to any kind of android device to review the biological information to comprehend the status of patients.

3.8 Block Diagram


This is a block diagram of android application functionalities.

Chapter 4 Setting up the equipment

NITM ELVIS has a built-in Data Acquisition (DAQ) module which has 8 differential analog input channels. Those channels were named from AI0 to AI7. NITM ELVIS also has power supplies which can supply the 5V DC and ground for those sensors we used in the project.

Two Analog Proto Board Connectors which allow the use of vernierTM analog BTA sensors on NITM ELVIS prototyping board were used on the prototyping board to get the connectivity to those vernierTM sensors.

Connect the following pins to wire the connector:

AI0 to SIG1 of the Analog Proto Board Connector

+5V DC power supply to 5V of the Analog Proto Board Connector

GROUND power supply to GND of the Analog Proto Board Connector

AIGND to GND of the Analog Proto Board Connector

After setting up the analog proto board connector, plug in the temperature sensor. Then the temperature sensor was setting up successfully. The installation method of the heart rate receiver is the same as the temperature sensor.

Vital Signs

Vital Signs are measures of individual's level of physical functioning. Vital signs include heart rate, breathing rate, blood pressure and temperature, which are measured by health professional. Normal vital signs change with different age, gender, weight, and exercise tolerance conditions.

Heart Rate

The heart rate is the number of times a person's heart beat per minute. There are three types of heart rates, resting heart rate, exercise heart rate and maximum heart rate. Resting heart rate varies from 40 beats per minute to 100 beats per minute. The average heart rate for men is 70 BPM and 75 BPM for women. Exercise heart rate is increased heart rate from physical activity. Maximum heart rate is the heart beat at 100% exertion. There are possible side effects when going over the maximum heart rate, exhaustion, body stops burning fat or causing hyperventilates.

Body Temperature

Core body temperature is normally controlled by the body chemical reactions. Body temperature shows signs of infection of human body. The average core body temperature is normal at 98.6 F (37 C). Anything above 98.6 F and below 100.4 F is considered low fever. Fever of 104 F and above required immediate treatment or medication, visiting a doctor is recommended.

Respiratory Rate

The respiratory rate is an indicator of potential respiratory dysfunction. The respiratory rate varies with different ages; normal respiratory rate for an adult is about 12 - 20 breaths per minute.

Blood Pressure

Blood pressure is a measurement of blood force applied to the wall of arteries. The pressure is measured by the amount of blood pumped from the heart. There are two readings recorded for blood pressure; systolic pressure and diastolic pressure. Systolic pressure is the maximal contraction of the heart; Diastolic pressure is the resting pressure. The normal Systolic pressure is less than 120 mm Hg, and the normal Diastolic pressure is less than 80 mm Hg. Any number measured show signs of health problem. As the chart showing below, different stages of prehypertension is detected if systolic pressure is higher than 80 mm Hg and diastolic pressure is higher than 80 mm Hg.

Data in the project

In this project, the body surface temperature and the heart rate have be measured by the equipment. The data for healthy heart rate and temperature are programmed into the Android application. The option of contacting a doctor is given when the unhealthy situation is detected.

Sample Data Collection

Some experiments were done for this project by collection sample data after drinking different fluid. The beverage we chose for the experiments are coffee, energy drink and coke.

A healthy person has heart rate of 85 pulses per minute before drinking anything and before doing any exercise.

After drinking coke, his heart rate increased to 98 pulses per minute.

After drinking coffee, his heart rate increased to 98 pulses per minute as well.

Another experiment was done with another person. The heart rate is measured at 102 pulses per minute at normal.

After drinking energy drink, his heart rate increased to 107 pulses per minute.


What is Bluetooth Wireless Technology


Bluetooth is a well-known technology which is widely used in wireless communication field. Most of mobile devices have built-in Bluetooth functions. In this project, the Bluetooth wireless technology was used to replace cable to improve the mobility of the patients and the clinicians that provide their treatments.

Bluetooth wireless technology is an open specification which means it is publicly, and it is a low-cost, low-power, short-range radio technology, wire-replacement communications protocol for PAN wireless communication of voice and data anywhere in the world.

Normally, the Bluetooth devices can connect each other over the air by using radio frequency waves at a distance of 10 meters with a low power (2.5mW). Using higher transmission power (100mW) will improve the range to approximately 100m. Therefore, it is a low-power communication within short-range which means that it is suited for portable, battery-operated devices.

Bluetooth wireless technology can be used anywhere in the world because it is government unlicensed, it operates at 2.4 GHz which is globally available, license-free, industrial, scientific, and medical (ISM) band. And this wireless technology is designed to be very robust interfacing multiple devices, which make this technology ubiquitously used widely around the world; almost every cell phone has a built-in Bluetooth chip.

Right now, the data rate of the Bluetooth Verizon 2.1 is 3Mbits/sec, and the maximum application throughput is 2.1 Mbits/sec, which can support a lot of applications.

Overview of the Bluetooth Stack Architecture

Bluetooth Radio

Bluetooth uses a radio technology which is frequency-hopping spread spectrum, this radio technology chops up the data being sent and transmits chunks of it on up to 79 bands (1 MHz each; centered from 2402 to 2480 MHz) in the range 2,400-2,483.5 MHz (allowing for guard bands). This range is in the globally unlicensed Industrial, Scientific and Medical (ISM) 2.4 GHz short-range radio frequency band.

Originally Gaussian frequency-shift keying (GFSK) modulation was the only modulation scheme available; subsequently, π/4-DQPSK and 8DPSK modulation may also be used in Bluetooth 2.0.


The baseband layer enables the physical radio frequency link between Bluetooth devices in a piconet. Because the Bluetooth system uses frequency hopping spread spectrum technology, packets are transmitted in defined time slots across defined frequencies, this layer uses inquiry and paging procedures to synchronize the transmission hopping frequency and clock of different Bluetooth devices.

Two different kinds of physical links with their corresponding baseband packets are provided: Synchronous Asynchronous Connectionless (ACL) and Connection­Oriented (SCO), which can be transmitted in a multiplexing manner on the same radio frequency link. ACL packets are only used for data, while the SCO packet can contain only audio or a combination of both data and audio. All packets can be provided with different levels of error correction and can be encrypted to ensure privacy. Additionally, the link management and control messages are each allocated a special channel.

Packets containing audio data can be exchanged between two or more Bluetooth devices, making diverse usage models are possible. The audio data in SCO packets are transferred between Basebands directly, instead of going through L2CAP. The audio model is comparatively uncomplicated within the Bluetooth specification; any two Bluetooth devices can both send and receive audio data between each other just by establishing an audio link.

Logical Link Control and Adaptation Protocol

The Logical Link Control and Adaptation Protocol (L2CAP) supports higher level protocol multiplexing, packet segmentation and restructuring, and quality of service (QoS). It allows higher levels L2CAP protocols and applications transmit and receive packets to 64 Kbytes in length. While the baseband protocol provides the SCO and ACL link types, only for L2CAP ACL defined links and it does not support the SCO links. Sound quality channel for audio usually run over the baseband SCO links. However, audio data may be packaged and sent using communication protocols running over L2CAP.

Service Discovery Protocol (SDP)

In the Bluetooth framework, discovery services are an important component since they provide the basis for all the usage models. Using SDP, services, device information, and the characteristics of the services can be queried. Having located available services within the vicinity, the user may select from any of them. After that, a connection between two or more Bluetooth devices can be established.

Cable Replacement Protocols

The Bluetooth specification has two cable replacement protocols that send control signaling over wireless links, emulating the kind of signaling normally associated with wire-line links.


RFCOMM protocol is the simulation a serial line based on the European telecommunications standards institute of technical standards, this also is the global system for mobile phone (GSM) communication devices. The ETSI is a non­profit organization that produces the telecommunications standards used throughout Europe. It emulates RS­232 control and data signals run over the baseband, providing transport capabilities for higher level services which use serial line as the transport mechanism. It supports the applications which can make use of a device's serial port. The communication part is a Bluetooth link from one device to another. Where the communication segment is another network, Bluetooth wireless technology is used for the path between the device and a network connection device like a modem. RFCOMM is only relate to the connection between Bluetooth devices in the direct connect case, or between the Bluetooth device and a modem in the network case.

Bluetooth Profile

The Bluetooth SIG has recognized diverse usage models; each of them is accompanied by a profile. The profiles define the protocols and features that support a particular usage model. If devices produced by different manufacturers which obey to the same Bluetooth SIG profile specification, then they can communicate to each other when used for that particular service and usage case.

There are four general profiles are used in the diverse usage models: the Generic Access Profile (GAP), the Serial Port Profile (SPP), the Service Discovery Application Profile (SDAP), and the Generic Object Exchange Profile (GOEP). The Generic Access Profile is the most basal one which ensures devices can find and connect to each other.

Generic Access Profile

When the Bluetooth devices want to connect others, the first step is discovering the other Bluetooth devices. The most important purpose of Generic Access Profile is discovering the Bluetooth services. The Generic Access Profile defines the general procedures for discovering Bluetooth devices as well as the link management procedures for connecting them together. Therefore, the main application of this profile is to describe the use of the lower layers of the Bluetooth protocol stack-Link Control (LC) and Link Manager Protocol (LMP).

The Generic Access Profile can capture some information of other Bluetooth devices which are in discoverable mode such as the names, identities, and basic capabilities. A device in discoverable mode is ready to connect and receive service requests from other devices.

All the Bluetooth devices must conform to the Generic Access Profile at least. This ensures basic coexistence and interoperability between all Bluetooth devices, no matter what type of applications they support. Devices that conform to another Bluetooth profile may use adaptations of the generic procedures as specified by that profile. However, they must still be compatible with the Generic Access Profile at the generic procedures level.

Serial Port Profile

The most important purport of the Bluetooth wireless technology is replacing the cable with the radio frequency waves. The Serial Port Profile (SPP) is working for the resulting connection­oriented channel to replace the cable. This profile is built upon the Generic Access Profile; it defines how Bluetooth devices can be set up to emulate a serial cable connection using RFCOMM, a transport protocol was motioned above that it can emulates RS­232 serial ports between two peer devices. This protocol runs on an L2CAP channel and it is used to transport the user data, modem control signals and configuration commands.

Any legacy application can be run on either device, using the virtual serial port which is created by the Serial Port Profile. The wireless link is used like a physical serial cable, with RS­232 control signaling, were connecting the two devices.

Establishment Procedures

In profiles' support, Bluetooth devices can establish a connection with each other. There are three establishment procedures were defined in the Bluetooth specification: link, channel, and connection. But before any establishment procedure can be initiated, certain information has to be available to the initiating device, which is obtained during device discovery:

The page scan mode used by the remote device

The system clock of the remote device

The device address of the device access code

Additional information obtained during device discovery that is useful for making the decision to initiate an establishment procedure is the class of device and the device name.

Link Establishment

The link establishment procedure is used to set up a physical link-specifically, an Asynchronous Connectionless (ACL) link-between two Bluetooth devices using procedures from the Bluetooth IrDA Interoperability Specification and Generic Object Exchange Profile.

Within Bluetooth, the paging procedure conforms to the Bluetooth IrDA Interoperability Specification. The paging unit uses the device access code and page mode received through a previous inquiry. After paging is completed, a physical link between the two Bluetooth devices is established. If a reversal of master­slave roles is required-typically, it is the paged device that has an interest in changing roles-it is done immediately after the physical link is established. If the paging device does not accept master­slave role reversal, the paged device determines whether or not to maintain the physical link. Both devices can perform link setup using Link Manager Protocol (LMP) procedures that require no interaction with the host on the remote side. Optional LMP features can be used, but only upon confirmation that the other device supports the requested feature.

When the paging device needs to go beyond the link setup phase, it issues a request to be connected to the host of the remote device. If the paged device is in security mode 3, this is the trigger for initiating authentication. The paging device then sends a host connection request during link establishment, but before channel establishment, and may initiate authentication after having sent the host connection request. After authentication has been performed, any of the devices can initiate encryption. Further link configuration may take place after the host connection request. When the requirements of both devices are satisfied, each sends a message to the other indicating that setup is complete.

Channel Establishment

The channel establishment procedure is used to set up a channel (logical link) between two devices using the Bluetooth File Transfer Profile Specification. Channel establishment starts after link establishment is completed. At that point, the initiating device sends a channel establishment request. Security procedures may take place after channel establishment has been initiated. Channel establishment is completed when the remote device answers the channel establishment request with a positive response.

Connection Establishment

The connection establishment procedure is used to set up a connection between applications on two Bluetooth devices. Connection establishment starts after channel establishment is completed. At that point, the initiating device sends a connection establishment request. The specific request used depends upon the application. It may be a TCS SETUP message in the case of a Bluetooth telephony application, for example, or initialization of RFCOMM and establishment of a data­link connection in the case of a serial port­based application. Whatever the application, connection establishment is completed when the remote device accepts the connection establishment request.

When one Bluetooth device has established a connection with another Bluetooth device, it may be available for a second connection on the same channel, a second channel on the same link, or a second physical link-or any combination of these. If the new establishment procedure is directed toward the same remote device, the security part of the establishment depends on the security modes already in use. If the new establishment procedure is directed toward a different remote device, the initiating device behaves according to active modes, apart from the fact that a physical link is already established.

Establish Link/Set up Virtual Serial Connection

This procedure describes the steps required to establish a connection to an emulated serial port of a remote device.

1. Submit a query using the Service Discovery Protocol (SDP) to determine the RFCOMM server channel number of the application in the remote device. If a browsing capability is included, the user can select from among the available ports (or services) in the peer device. If the user knows exactly which service to contact, it is only necessary to look up the parameters using the Service Class ID associated with that service.

2. As an option, the remote device may be required to authenticate itself; as another option, encryption can be enabled.

3. Request a new L2CAP channel to the remote RFCOMM entity.

4. Initiate an RFCOMM session on the L2CAP channel.

5. Start a new data­link connection on the RFCOMM session using the server channel number. When this procedure is completed, the virtual serial cable connection is ready for use by the applications on both devices. If an RFCOMM session already exists between the devices when setting up a new data­link connection, the new connection is established on the existing RFCOMM session, in which case steps 3 and 4 become unnecessary.

Accept Link/Establish Virtual Serial Connection

This procedure requires that the Acceptor take part in the following steps:

1. Provide authentication if requested, and upon further request, turn on encryption.

2. Accept a new channel establishment indication from L2CAP.

3. Accept an RFCOMM session establishment on that channel.

4. Accept a new data­link connection on the RFCOMM session.


In the project, the NITM ELVIS with sensors were regard as a portable health monitor. The sensors can obtain the data of heart beat and the temperature and The LabVIEW program which are called virtual instrument (VI) will process the data and send the data out though the built-in Bluetooth module of the computer which connects with the NITM ELVIS.

In the LabView program platform, there is a data acquisition module named DAQ assistant which can collect the input data of NITM ELVIS. There are two sets of input signal; AI0 is the temperature signal, and AI1 is the heart beat signal. And the data port of the DAQ assistant module will send out the data.

Each VI has a creation of user interfaces called front panels and a graphical block diagram on which the programmer connects different function-nodes by drawing wire. After getting the data, the LabVIEW VI created will process the data, display the signal wave and calculate the result of the data. The front panel and the block diagram ware designed as the figure.

Before transmit the data via the Bluetooth module, the last step of the data manipulation was that the type of the data need be transferred to string, because the Bluetooth virtual serial port were used as a RS232 serial port which can only transmit strings.



What is Android?

Android is an open source software application for mobile devices. Operating system, middleware and Android applications are three major components of Android software. Android is the first truly open and comprehensive platform for some mobile devices.

Background and purpose of developing android application

Android, Inc. was founded in October 2003 in Palo Alto, California, United States. Android Inc. admitting that it was working on software for mobile phones. The amount of mobile phone users worldwide has grown very quickly to nearly 3 billions, mobile phone business became attractive for many companies. Google then acquired Android Inc. in August 2005, because Google was intended to enter the mobile phone market. The Open Handset Alliance (OHA) is a consortium of these companies, which include Broadcom Corporation, Google, HTC, Intel, LG, Marvell Technology Group, Motorola, Nvidia, Qualcomm, Samsung Electronic, Sprint Nextel, T-Mobile and Texas Instruments, etc. The OHA unveiled the goal to develop open standards for mobile devices and their first Android product on November 5, 2007. Android is now one of the most popular mobile operating system in the world. As of Q4 2010, Android had grown to own 33 percent of market shares, becoming the top selling smart-phone platform.

Android operating system will be the most popular Mobile operating system in the future. From the course WCOM 612 "Wireless Economic Topic", we learned that there are three major reasons that Android gains the largest market shares of mobile device market in the near future. First of all, Android is an open source operating system, which means mobile phone companies are able to implement Android to mobile devices for free. Moreover, since mobile phone companies are willing to create advanced smart-phone for Android at a low price, more consumers would like to purchase these Android phones. Finally, the SDK for developing Android applications is free to use for all application developers. There will be all kinds of Android applications in the market and free for download by mobile phone users. Low cost on smart-phone is a major reason why most people would like to use Android devices.

Developing an Android application is a major concentration of our project. As we mentioned above, the Android SDK is free for all android developers and the high speed of growth on Android users. The benefits of Android application development are not only we can develop Android application at free of cost, but also many Android users will be using our application in the near future. Nevertheless this project is about the e-health, hence, the more people using this application, the more lives it saves.

Guide for developing Android Application

Android provides you the opportunity to create mobile phone interfaces and applications design as you image them. Android applications are written using Java programming language and the Android SDK. Knowing Java language and understanding all the Android API libraries is the key to programming Android application. Furthermore, understanding the open platform of Android OS is helpful for advanced Android application development.

Android is made up of several dependent parts including the following:

A hardware reference design that describes the capabilities required of a mobile device in order to support the software stack

A Linux operating system kernel that provides the low-level interface with the hardware, memory management, and process control, all optimized for mobile devices

Open source libraries for application development including SQLite, WebKit, OpenGL, and a media manager

A run time used to execute and host Android applications, including the Dalvik virtual machine and the core libraries that provide Android specific functionality.

An application framework that exposes system services to the application layer, including the window manager, content providers, location manager, telephony, and peer-to-peer services

A user interface framework used to host and launch applications

A software development kit used to create applications.

Configuration Application Development Environment

Setting up the development environment is the first thing to do before programming the first Android application. Here are the steps on how to setup the environment.

Step1: Install JDK

Download the Java SE Development Kit 6 (JDK) from the following site:

Click the 'Download JDK' button from the 'Java Platform, Standard Edition' table. Install the JDK environment with default settings

Step2: Install Eclipse IDE

In this step you will install the Eclipse IDE. Download the latest version of Eclipse IDE for JAVA Developers from

After installation, start eclipse.exe

Step3: Run Android SDK Downloader

The Android SDK is distributed through an SDK starter package containing the SDK Tools. Download the starter package from:

Add the tools\directory to your Windows path.

Right-click on Computer on the desktop and select Properties, use the Advanced system settings to open the System Properties window and select Environment Variables on the "Advanced" tab. Look for variable path in the "System Variables" window. After pressing Edit, scroll to the end of Variable value: and add the full path to the tools\ directory to the end of the path, separated by a semicolon from the one before.


Step4: Setting up Android ADT

Android Development Tools (ADT) is a powerful extension to Eclipse; it connects Eclipse with the Android SDK and helps with application development. This package was installed from within Eclipse.

Select Help->Install New Software, Add the URL

into the Work field.

After a short while Developer Tools appears in the field. Select Android Development Tools and Android DDMS, then click Next

Android Development Tools and Android DDMS provide developers with debugging support.

Step5: Android SDK Platform Support

To develop for Android, support for the appropriate Android platform must be installed. The Android SDK and AVD Manager were used to install additional components and support for different platforms. There are two methods to invoke the SDK and AVD Manager.

1, Start the SDK Setup.exe from the root of the SDK setup directory, or

2, Select in Eclipse the menu Window->Android SDK and AVD Manager.

In case the Android SDK location was not setup correctly within Eclipse, go to Windows->Preferences->Android and set the SDK location field to the root of your SDK install directory.

In the Manager select Available Packages and check the following boxes under the standard repository:

To install the selected options one must hit Install Selected and accept all licenses on the next window.

The Eclipse environment is now ready for Android development.


In the research, the LabView device is used as a mobile health monitor. This android application method can work with most kinds of mobile health sensors with Bluetooth. It can help doctors to monitor the healthy status of the patients. This method can let patients have mobility because android phones have the connectivity to the network to send the data to the doctors.