1

In this topic I found out about Samsung Digital Health Android SDK for getting S-Health Data.

Now I'm struggling how to convert sample 'SimpleHealth' in Java which Samsung gives into my app in JavaScript (Wearable devices, Tizen 2.3.2). Is it possible via JavaScript? Or it's possible only via Native Development (C, C++)?

Community
  • 1
  • 1
Serzh
  • 11
  • 3

2 Answers2

1

You can use the following API directly in the Gear device. https://developer.tizen.org/development/api-references/web-application?redirect=https://developer.tizen.org/dev-guide/3.0.0/org.tizen.web.apireference/html/device_api/wearable/tizen/humanactivitymonitor.html

An alternative method would be to use the Android SDK and send the data alone to a companion app in Gear using SAP.

Sanjeev BA
  • 307
  • 1
  • 6
  • Hi, I have done it in android for steps using its own SDK but I wanna know why it doesn't work when I follow same process for blood pressure, calories etc ? – Anshul Tyagi Apr 17 '17 at 13:21
1

You can write your own code using Samsung Digital Health SDK and exchange data with S Health app. To enable data exchange between your app and S Health you need Partner Apps Access. From S Health app you can sync these data with your Gear using Gear Manager app.

For independent app in Gear which can measure different Human Activity data, you can use Human Activity Monitor API in Tizen. You will be able to measure

  • Heart Rate
  • Wrist Up
  • Step Status
  • Speed
  • Walking frequency
  • Walking Activity
  • Sleep status

And another method is you will write your Health application using Samsung Digital Health Android SDK in android. But this app must be SAP enabled to send these Health data to Gear. To use SAP you have to use Samsung Accessory SDK. In Gear part you can write your app either in Native or in Web. This is call companion app. To transfer data between companion apps you have to connect your Gear with Android phone using Gear Manager.

Iqbal hossain
  • 1,778
  • 3
  • 17
  • 24
  • What do I need to do to make it work? I'm struggling to find out how to get the step count from wearable accessories like Gear S3. I've have already used 'source_type' with 1 --- ReadRequest request = new ReadRequest.Builder() .setDataType("com.samsung.shealth.step_daily_trend") .setFilter(Filter.eq("source_type", 1)) .setSort("day_time", HealthDataResolver.SortOrder.DESC) .build(); --- but it doesn't work =( – Serzh Apr 07 '17 at 15:47
  • Also I've used UUID from HealthDeviceManager, and setSourceDevices() API on HealthDataResolver, but I don't know how to get UUID and what about other the same Gear S3. Will they have the different UUIDs or Do all the Gear S3 have the same UUID (one UUID for one type of the devices?) – Serzh Apr 07 '17 at 15:47
  • HealthDeviceManager hdm = new HealthDeviceManager(mStore); HealthDataResolver.ReadRequest request = new ReadRequest.Builder() .setDataType(HealthConstants.StepCount.HEALTH_DATA_TYPE) .setSourceDevices(hdm.getDeviceUuidsByModel("?-Gear S3-?")) .setProperties(new String[] {HealthConstants.StepCount.COUNT}) .setFilter(filter) .build(); – Serzh Apr 07 '17 at 15:47
  • Your code is not understandable here like this. You just wanted to know the way. please provide more info or post it in another thread – Iqbal hossain Apr 10 '17 at 04:30