com.samsung.android.sdk.healthdata
Interface HealthConstants.StepCount
-
- All Superinterfaces:
- HealthConstants.Common, HealthConstants.SessionMeasurement
- Enclosing class:
- HealthConstants
public static interface HealthConstants.StepCount extends HealthConstants.SessionMeasurement
This interface defines the user's step count data. It provides only 1 month data.HealthConstants.StepCount
is recorded from:- A phone with Samsung Health installed.
It enables a partner app to get the phone's steps with a real-time. - Accessories such as a Watch.
A partner app can get step data of the accessories after a data sync to the phone.
HealthConstants.StepDailyTrend vs. HealthConstants.StepCount
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 HealthOnly 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
Properties of the following extending interfaces are available for this data type.
Step count data has the following properties.
See more common properties by spreading this section out.Property name Description HealthConstants.StepCount.DEVICE_UUID [Mandatory]
Device identifier which provides the health dataHealthConstants.StepCount.START_TIME [Mandatory]
UTC milliseconds when the measurement is started;
Making a duration fromSTART_TIME
toEND_TIME
with 1 minute is recommended.HealthConstants.StepCount.END_TIME [Mandatory]
UTC milliseconds after the measurement has ended;
Making a duration fromSTART_TIME
toEND_TIME
with 1 minute is recommended.HealthConstants.StepCount.TIME_OFFSET [Mandatory]
Time offset in milliseconds which considers the time zone and daylight saving timeHealthConstants.StepCount.COUNT [Mandatory]
Total number of stepsHealthConstants.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 Data Permission
The user's consent is required to read or write this data type. HealthPermissionManager.requestPermissions() displays a data permission UI to the user.
See Permission Manager and request data permission.- Since:
- 1.0.0
-
-
Field Summary
Fields 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.-
Fields inherited from interface com.samsung.android.sdk.healthdata.HealthConstants.SessionMeasurement
END_TIME, START_TIME, TIME_OFFSET
-
Fields inherited from interface com.samsung.android.sdk.healthdata.HealthConstants.Common
CREATE_TIME, CUSTOM, DEVICE_UUID, PACKAGE_NAME, UPDATE_TIME, UUID
-
-
-
-
Field Detail
-
SAMPLE_POSITION_TYPE
static final String SAMPLE_POSITION_TYPE
Part of the body where the user places the device.- Optional
- Type:
int
- Available values: one of the following values
- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
SAMPLE_POSITION_TYPE_UNKNOWN
static final int SAMPLE_POSITION_TYPE_UNKNOWN
Device is placed in an unknown position.
Its constant value is230001
.- Since:
- 1.0.0
- See Also:
SAMPLE_POSITION_TYPE
, Constant Field Values
-
SAMPLE_POSITION_TYPE_WRIST
static final int SAMPLE_POSITION_TYPE_WRIST
Device is placed in the wrist.
Its constant value is230002
.- Since:
- 1.0.0
- See Also:
SAMPLE_POSITION_TYPE
, Constant Field Values
-
SAMPLE_POSITION_TYPE_ANKLE
static final int SAMPLE_POSITION_TYPE_ANKLE
Device is placed in the ankle.
Its constant value is230003
.- Since:
- 1.0.0
- See Also:
SAMPLE_POSITION_TYPE
, Constant Field Values
-
SAMPLE_POSITION_TYPE_ARM
static final int SAMPLE_POSITION_TYPE_ARM
Device is placed in the arm.
Its constant value is230004
.- Since:
- 1.0.0
- See Also:
SAMPLE_POSITION_TYPE
, Constant Field Values
-
DISTANCE
static final String DISTANCE
Distance in meters during the activity.- Optional
- Type:
float
- Value range: 0 ~ 18000
- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
CALORIE
static final String CALORIE
Burned calories in kilocalories during the activity.- Optional
- Type:
float
- Value range: 0 ~ 1200
- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
COUNT
static final String COUNT
Total number of steps during the activity.- Mandatory
- Type:
int
- Value range: 0 ~ 12000
- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
SPEED
static final String SPEED
Speed in meters per second during the activity.- Optional
- Type:
float
- Value range: 0 ~ 10
- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
HEALTH_DATA_TYPE
static final String HEALTH_DATA_TYPE
Data type name for step count data.
Use"com.samsung.health.step_count"
to add permission to the manifest file.- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
-