Friday, November 11, 2011

Using Android to develop healthcare applications and devices

Believe or not, most makers of DIY Gadgets are very greenpeace-compatible because many DIY projects recycle garbage to create something useful. Healthcare is certainly one of the many topics we shouldn't ignore, not only because of the ethical nature that gears to what a DIYer would love, but also because it involves many external hardware devices, great gadgets for curing illness and saving lives.

Since Android Ice Cream Sandwich (Android 4.0, API 14), we can develop Android applications for Bluetooth Health devices.

The official Android Developer site indicates that the BluetoothHealth API allows communication with devices that implement the Bluetooth Health Profile (HDP).

What is that? What can we do?

Let's see what a Bluetooth profile is: it is a wireless interface specification for Bluetooth-based communication between devices. In order to use Bluetooth technology, a device must be compatible with the subset of Bluetooth profiles necessary to use the desired services. A Bluetooth profile resides on top of the Bluetooth Core Specification and (optionally) additional protocols. While the profile may use certain features of the core specification, specific versions of profiles are rarely tied to specific versions of the core specification.

Bluetooth headset users are very familiar with the Advanced Audio Distribution Profile (A2DP). This profile defines how high quality audio (stereo or mono) can be streamed from one device to another over a Bluetooth connection. For example, music can be streamed from a mobile phone, to a wireless headset, hearing aid & cochlear implant streamer, or car audio or from a laptop/desktop to a wireless headset.

Health Device Profile (HDP) is also a traditional Bluetooth profile. It is designed to facilitate transmission and reception of Medical Device data. The APIs of this layer interact with the lower level Multi-Channel Adaptation Protocol (MCAP layer), but also perform SDP behavior to connect to remote HDP devices. It also makes use of the Device ID Profile (DIP).

Here are some documents:

Ok, too much new information for non bluetooth-experts. Let's see some examples. These videos are really old where you can find some ancient phones. but you can imagine with today's beyond-smart-phones, everything can be greatly refined.

Video links:

How to use BluetoothHealth API in Android?

It is fairly easy, just create a BluetoothHealth object. BluetoothHealth is a proxy object for controlling the Bluetooth Service via IPC. If you don't know what IPC is, check it out here.

How to connect to an external health device which is acting in the source role:

  • Use getProfileProxy(Context, BluetoothProfile.ServiceListener, int) to get the BluetoothHealth proxy object. 
  • Create an BluetoothHealth callback and call registerSinkAppConfiguration(String, int, BluetoothHealthCallback) to register an application configuration 
  • Pair with the remote device. This currently needs to be done manually from Bluetooth Settings 
  • Connect to a health device using connectChannelToSource(BluetoothDevice, BluetoothHealthAppConfiguration). Some devices will connect the channel automatically. The BluetoothHealth callback will inform the application of channel state change. 
  • Use the file descriptor provided with a connected channel to read and write data to the health channel. 
  • The received data needs to be interpreted using a health manager which implements the IEEE 11073-xxxxx specifications. 
  • When done, close the health channel by calling disconnectChannel(BluetoothDevice, BluetoothHealthAppConfiguration, int) and unregister the application configuration calling unregisterAppConfiguration(BluetoothHealthAppConfiguration) 

PS: There multiple BLE Health related profiles, the profile that Android uses is a very traditional one, which is not to be confused with similar Bluetooth Low Energy (BLE) profiles such as Health Thermometer and Hear Rate Monitor.

Now that Android is starting to provide official APIs, and that wireless integration with Healthcare has always been a great topic, it is worth getting started.

Imagine when you combine the Android BluetoothHealth API with Google Health APIs, that can create something really neat.

The Java Health Client APIs are documented at:

You can use "gdata" APIs on Android:

For authentication, there's a section in the Health API docs on choosing the appropriate mechanism:

One more thing: if you are not very interested in Bluetooth, start with something easy but really usesful, with your imagination.

Last weekend I made this application, pure software, aiming at helping people to better sleep without signal radiation and data consumption. It is called "Auto Signal Off When I Sleep", available in Android Market here.

That's way simple! You'd say. Well, it is a useful healthcare application, ain't it? Start your own healthcare applications now.


  1. I am also shock to about this service in your appeared technology is very employed to us and impressive

    1. Great Article
      android based projects

      Java Training in Chennai

      Project Center in Chennai

      Java Training in Chennai

      projects for cse

      The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

  2. Android developers create so many applications which is good for health sector. Here I read another example of app development for health sector. Android Event Application

  3. Android apps a very unique thing,If any developers have skill and grip on android apps then he can create any kind of program
    70-410 but i have grip on networking field,last year i have got certification about the network. You can buy easily paper relate to the Microsoft networking.

  4. There are many industries which are closing down but healthcare is something which would always be needed by the masses. This field is growing rapidly and thus one can expect the number of jobs to grow with each year.
    Smart Medigap Plans

  5. Another example is providing awareness about flu vaccines and encouraging people to get the vaccination.Stanozolol kaufen

  6. Very nice post, I certainly love this website, keep on it. :)

  7. JBL Bluetooth headphones, including earbuds, earphones, in-ear headphones, and on-ear bluetooth plantronics explorer 502 vs m70

  8. A lot of people having an incorrect image about the cash advance loans or sometimes refer it as bad credit payday loans. Website

  9. I have read your blog its very attractive and impressive. I like it your blog.

    hotmail signup process
    kissanime alternatives

  10. I admit, I have not been on this web page in a long time... however it was another joy to see It is such an important topic and ignored by so many, even professionals. I thank you to help making people more aware of possible issues. Healthcare

  11. Android is an open-source software stack created for mobile phones and other devices. It is combines and builds upon parts of several dissimilar open source projects.gerald winata gozali

  12. This is truly a decent and useful, containing all data furthermore greatly affects the new innovation. A debt of gratitude is in order for sharing it  frec 4 course

  13. Awesome blog. I enjoyed reading your articles. You can install all paid games for free with tutuapp tutuapp download

  14. I frequently benefit from locating a site that gives you great ideas since I like being familiar with new stuff. Pleased when I came across your web blog because I greatly enjoyed this and so I anticipate your future article. An awesome web page and i'll return again for additional fantastic content… Please go to site webstagram

  15. Exception handling is an important part of writing powerful Java applications.Understanding Exception Handling In Java

  16. Hello. I am a researcher working on this subject. Thanks to your writing, my research is complete. 토토사이트

  17. First of all, thank you for your post. Your posts are neatly organized with the information I want, so there are plenty of resources to reference. I bookmark this site and will find your posts frequently in the future. Thanks again ^^ 토토사이트

  18. As soon as I noticed this internet site I went on reddit to share some of the love with them. 안전놀이터

  19. Are you the one who studies this subject?? I have a headache with this subject.온라인카지노사이트추천Looking at your writing was very helpful.


Disqus for DIY Phone Gadgets