Daily Step Count Trend


The daily step count trend is Samsung Health's custom data type. It holds more one month data differing with HealthConstants.StepCount.

It gives summarized step count data for a day. It creates daily step count data for each source type at the beginning or end of the day if there is step count for a source type. The created data is updated every few minutes or once a day. Updating the created data differs depending on a source type. See source_type for more information.

If you need real-time step count data of the local device installed Samsung Health, use HealthConstants.StepCount.

Data Type Name

Its data type name is:

    "com.samsung.shealth.step_daily_trend"

Data Permission

You need to acquire data permission for this data type to read data.
See Permission Manager and request data permission.

Use its data type name to add its permission to manifest.

     <meta-data android:name="com.samsung.android.health.permission.read"
                android:value="com.samsung.shealth.step_daily_trend"/>

Getting All Step Count

It's a common case that the user has a phone and an accessory like Gear S3.
Sometimes the user can carry the phone and accessory both or only one device differently. If the user carried Gear and Phone both as 1) and 4) sessions in the figure below, both devices created step count separately.

    • 1) 9:00 ~ 10:00 – carrying Gear and Phone both.
    • 2) 10:00 ~ 10:40 – carrying only Phone.
    • 3) 10:40 ~ 12:00 – carrying only Gear.
    • 4) 12:00 ~ 13:00 – carrying Gear and Phone both.

Reading HealthConstants.StepCount data from 9:00 to 10:00 gives all measured steps from Gear and Phone both. Adding all data’s step count in the result will be over than your expectation.
If you want to get the user's all steps for multiple data sources, duplicated steps have to be subtracted from the result. It is a tricky work definitely.

"com.samsung.shealth.step_daily_trend" is a simple way to get the user's all step count from multiple data sources.
Its source_type property defines the kind of data sources like all data sources, partner apps, and only the phone.

Most useful source type is -2 that provides the user's all step count for all data sources including devices and partner apps.

Copyright © Samsung Electronics, Co., Ltd. All rights reserved.