wear-ossensorstemperatureheartratehealthconnect

Get Health data on WearOs watch, not on phone


I am creating an app for Samsung watch 6 which is using WearOS. I want to show following health data directly from the watch, independent of it being connected to any phone.

I found a sample app for HearRate called MeasureDataCompose. This works fine for Heart Rate, I want to get all above data. The sample code is either not intuitive that I could get the data above, or there is something I dont understand. I could not find any help on this, which is very disappointing.


Solution

  • Health Services on Wear OS is an API that will allow you to get sensor data from any device running Wear OS 3 or higher. This is the API the sample you linked uses.

    You can reference this page to learn about the 3 clients offered. Just as a quick overview:

    For the other metrics mentioned, you may want to look into the Samsung Privileged Health SDK if you are developing with a Galaxy Watch. This will enable you to get SPO2, Body Temperature, and access to PPG sensors.