10

I'm developing an app for Android Wear on Samsung Gear Live (Google I/O Edition) where it will need access heart rate and steps count history data. I know that later this data might be accessible using Google Fit SDK, but is it possible to read that data without using that SDK right now?

I would prefer to access this data without ROOTing my G Watch.

Here are the screenshots of the historical data that I would like to extract:

Steps History data:

enter image description here enter image description here

Heart Rate History Data:

enter image description here

UPDATE 10/28/2014

Google Release Google Fit SDK Available on the Official website

Maksim
  • 16,162
  • 25
  • 91
  • 128

2 Answers2

6

I guess the only option right now is for you to create your own heart rate and step counter apps that share historical data through content providers. I've written a quick tutorial on how to get data from heart rate sensor here.

Marc Tan
  • 118
  • 1
  • 5
  • 1
    That's a great blog post; thanks for sharing. I collated the info into a single gist for a basic Activity that runs on Wear: https://gist.github.com/mjohnsullivan/557c2f19ba177312b1d7. – Matt S. Jul 08 '14 at 12:53
5

As far as I've been able to tell, there's no public api that accesses the fitness data from the watch. I'm fairly confident that will become available when the Fitness SDK opens up, but that may be a while.

Until then, the only way I believe you can access that data is by reading the fitness app's private sqlite database. Unfortunately, you will need root to access it. It's located at:

/data/data/com.google.android.apps.fitness/databases/pedometer.db

It contains two tables worth looking at: heartrate and stepcount. Both are very simple. (Note: this is taken from a G Watch, and both tables exist, but the heartrate data is empty, as you would expect.)

I'm going to keep poking around in the apks to figure out of there's a queryable service, but I haven't seen one yet.

Cody Toombs
  • 4,300
  • 2
  • 12
  • 18