public static interface HealthConstants.StepCount extends HealthConstants.SessionMeasurement
HealthConstants.StepCount
is recorded from:
Choose a proper step data type for your service. Using HealthConstants.StepDailyTrend
is general.
HealthConstants.StepDailyTrend |
HealthConstants.StepCount |
|
---|---|---|
Data retention period | Until several years if daily steps are saved in the installed Samsung Health |
Only 1 month |
For one more devices (E.g. a phone and a Galaxy Watch) |
Providing all device's steps without duplications | Manual handling is required to remove duplicated steps |
Main use case | Getting the user's daily steps | Monitoring the phone's steps with a real-time |
Properties of the following extending interfaces are available for this data type.
Step count data has the following properties.
Property name | Description |
---|---|
HealthConstants.StepCount.DEVICE_UUID | [Mandatory] Device identifier which provides the health data |
HealthConstants.StepCount.START_TIME | [Mandatory] UTC milliseconds when the measurement is started; Making a duration from START_TIME to END_TIME with 1 minute is recommended. |
HealthConstants.StepCount.END_TIME | [Mandatory] UTC milliseconds after the measurement has ended; Making a duration from START_TIME to END_TIME with 1 minute is recommended. |
HealthConstants.StepCount.TIME_OFFSET | [Mandatory] Time offset in milliseconds which considers the time zone and daylight saving time |
HealthConstants.StepCount.COUNT | [Mandatory] Total number of steps |
HealthConstants.StepCount.DISTANCE | Distance during the activity |
HealthConstants.StepCount.CALORIE | Burned calories |
HealthConstants.StepCount.SPEED | Speed |
HealthConstants.StepCount.SAMPLE_POSITION_TYPE | Part of the body where the user places the device |
HealthConstants.StepCount.CUSTOM | Custom info which is formatted with JSON and compressed data |
Modifier and Type | Field and Description |
---|---|
static String |
CALORIE
Burned calories in kilocalories during the activity.
|
static String |
COUNT
Total number of steps during the activity.
|
static String |
DISTANCE
Distance in meters during the activity.
|
static String |
HEALTH_DATA_TYPE
Data type name for step count data.
|
static String |
SAMPLE_POSITION_TYPE
Part of the body where the user places the device.
|
static int |
SAMPLE_POSITION_TYPE_ANKLE
Device is placed in the ankle.
|
static int |
SAMPLE_POSITION_TYPE_ARM
Device is placed in the arm.
|
static int |
SAMPLE_POSITION_TYPE_UNKNOWN
Device is placed in an unknown position.
|
static int |
SAMPLE_POSITION_TYPE_WRIST
Device is placed in the wrist.
|
static String |
SPEED
Speed in meters per second during the activity.
|
END_TIME, START_TIME, TIME_OFFSET
CREATE_TIME, CUSTOM, DEVICE_UUID, PACKAGE_NAME, UPDATE_TIME, UUID
static final String SAMPLE_POSITION_TYPE
int
static final int SAMPLE_POSITION_TYPE_UNKNOWN
230001
.SAMPLE_POSITION_TYPE
,
Constant Field Valuesstatic final int SAMPLE_POSITION_TYPE_WRIST
230002
.SAMPLE_POSITION_TYPE
,
Constant Field Valuesstatic final int SAMPLE_POSITION_TYPE_ANKLE
230003
.SAMPLE_POSITION_TYPE
,
Constant Field Valuesstatic final int SAMPLE_POSITION_TYPE_ARM
230004
.SAMPLE_POSITION_TYPE
,
Constant Field Valuesstatic final String DISTANCE
float
static final String CALORIE
float
static final String COUNT
int
static final String SPEED
float
static final String HEALTH_DATA_TYPE
"com.samsung.health.step_count"
to add permission to the manifest file.Copyright © Samsung Electronics, Co., Ltd. All rights reserved.