Filter
-
Content Type
-
Category
Mobile/Wearable
Visual Display
Digital Appliance
Platform
Recommendations
Filter
Develop Health
apioverviewpackageclasstreedeprecatedindex com samsung android sdk healthdata interface healthconstants heartrate all superinterfaces healthconstants common, healthconstants sessionmeasurement enclosing class healthconstants public static interface healthconstants heartrate extends healthconstants sessionmeasurement this interface defines heart rate data of the user properties properties of the following extending interfaces are available for this data type healthconstants common healthconstants sessionmeasurement heart rate data has the following properties see more common properties by spreading this section out property name description healthconstants heartrate uuid [mandatory] data's unique id, assigned by the system when a new data is inserted healthconstants heartrate create_time [mandatory] utc milliseconds when a data is created in the health data store, assigned by the system when a new data is inserted healthconstants heartrate update_time [mandatory] utc milliseconds when a data is updated in the health data store, assigned by the system when a new data is inserted or the existing data is updated healthconstants heartrate package_name [mandatory] package name which provides data, assigned by the system when a new data is inserted healthconstants heartrate device_uuid [mandatory] device identifier which provides the health data healthconstants heartrate start_time [mandatory] utc milliseconds when the measurement is started healthconstants heartrate end_time [mandatory] utc milliseconds after the measurement has ended healthconstants heartrate time_offset [mandatory] time offset in milliseconds which considers the time zone and daylight saving time healthconstants heartrate heart_rate [mandatory] heart rate value healthconstants heartrate heart_beat_count [mandatory] total heart beat count for measurement time healthconstants heartrate min min value in binning_data healthconstants heartrate max max value in binning_data healthconstants heartrate binning_data continuous heart rate healthconstants heartrate comment comment healthconstants heartrate 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 binning_data continuous heart rate which is formatted with json and compressed data static string comment comment for data static string health_data_type data type name for heart rate data static string heart_beat_count total heart beat count for measurement time static string heart_rate heart rate value, beats per minute bpm static string max max value in binning_data static string min min value in binning_data 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 heart_rate static final string heart_rate heart rate value, beats per minute bpm mandatory type float value range 0 ~ 300 since 1 0 0 see also constant field values heart_beat_count static final string heart_beat_count total heart beat count for measurement time mandatory type int value range 0 and above since 1 0 0 see also constant field values comment static final string comment comment for data optional type string value length 0 ~ 255 since 1 0 0 see also constant field values min static final string min min value in binning_data optional type float value range 0 ~ 300 since 1 3 0 see also constant field values max static final string max max value in binning_data optional type float value range 0 ~ 300 since 1 3 0 see also constant field values binning_data static final string binning_data continuous heart rate which is formatted with json and compressed data optional type byte[] maximum data size 1000 kb binning data can have one or more segment each segment is composed of the following json keys json key type unit mandatory "heart_rate" float beat per minute yes set this value if you save binning_data "heart_rate_min" float beat per minute yes set this value if you save binning_data "heart_rate_max" float beat per minute yes set this value if you save binning_data "start_time" long utc millisecond yes set this value if you save binning_data "end_time" long utc millisecond yes set this value if you save binning_data the following example shows the json format for binning_data { "heart_rate" 147 48181, "heart_rate_min" 99 0, "heart_rate_max" 124 0, "start_time" 1422457096536, "end_time" 1493922600000 } compressed json conversion can be converting data to compressed json getting data from compressed json since 1 3 0 see also healthdatautil, constant field values health_data_type static final string health_data_type data type name for heart rate data use "com samsung health heart_rate" to add permission to the manifest file since 1 0 0 see also constant field values
Develop Health
apioverviewpackageclasstreedeprecatedindex com samsung android sdk healthdata interface healthconstants uvexposure all superinterfaces healthconstants common, healthconstants discretemeasurement enclosing class healthconstants public static interface healthconstants uvexposure extends healthconstants discretemeasurement this interface defines uv exposure data around the device properties properties of the following extending interfaces are available for this data type healthconstants common healthconstants discretemeasurement uv exposure data has the following properties see more common properties by spreading this section out property name description healthconstants uvexposure uuid [mandatory] data's unique id, assigned by the system when a new data is inserted healthconstants uvexposure create_time [mandatory] utc milliseconds when a data is created in the health data store, assigned by the system when a new data is inserted healthconstants uvexposure update_time [mandatory] utc milliseconds when a data is updated in the health data store, assigned by the system when a new data is inserted or the existing data is updated healthconstants uvexposure package_name [mandatory] package name which provides data, assigned by the system when a new data is inserted healthconstants uvexposure device_uuid [mandatory] device identifier which provides the health data healthconstants uvexposure start_time [mandatory] utc milliseconds when the measurement is started healthconstants uvexposure time_offset [mandatory] time offset in milliseconds which considers the time zone and daylight saving time healthconstants uvexposure uv_index [mandatory] measured uv index value healthconstants uvexposure latitude latitude value of the place healthconstants uvexposure longitude longitude value of the place healthconstants uvexposure altitude altitude value of the place healthconstants uvexposure accuracy accuracy value of location healthconstants uvexposure comment comment healthconstants uvexposure 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 accuracy accuracy value of location information static string altitude altitude value of the place in meters static string comment comment for data static string health_data_type data type name for uv exposure data static string latitude latitude value of the place in degrees static string longitude longitude value of the place in degrees static string uv_index measured uv index value fields inherited from interface com samsung android sdk healthdata healthconstants discretemeasurement 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 uv_index static final string uv_index measured uv index value mandatory type float value range 0 ~ 15 since 1 0 0 see also constant field values latitude static final string latitude latitude value of the place in degrees it follows wgs 84 optional type float value range -90 ~ 90 since 1 0 0 see also constant field values longitude static final string longitude longitude value of the place in degrees it follows wgs 84 optional type float value range -180 ~ 180 since 1 0 0 see also constant field values altitude static final string altitude altitude value of the place in meters it follows wgs 84 optional type float value range -1000 ~ 10000 since 1 0 0 see also constant field values accuracy static final string accuracy accuracy value of location information it follows wgs 84 optional type float value range 0 and above since 1 0 0 see also constant field values comment static final string comment comment for data optional type string value length 0 ~ 255 since 1 0 0 see also constant field values health_data_type static final string health_data_type data type name for uv exposure data use "com samsung health uv_exposure" to add permission to the manifest file since 1 0 0 see also constant field values
Develop Health
apioverviewpackageclasstreedeprecatedindex com samsung android sdk healthdata interface healthconstants foodintake all superinterfaces healthconstants common, healthconstants discretemeasurement enclosing class healthconstants deprecated use healthconstants nutrition instead of it this data type will be removed do not use it any more public static interface healthconstants foodintake extends healthconstants discretemeasurement this interface defines food intake data of the user properties of the following extending interfaces are available for this data type healthconstants common healthconstants discretemeasurement properties properties of the following extending interfaces are available for this data type healthconstants common healthconstants discretemeasurement food intake data has the following properties see more common properties by spreading this section out property name description healthconstants foodintake uuid [mandatory] data's unique id, assigned by the system when a new data is inserted healthconstants foodintake create_time [mandatory] utc milliseconds when a data is created in the health data store, assigned by the system when a new data is inserted healthconstants foodintake update_time [mandatory] utc milliseconds when a data is updated in the health data store, assigned by the system when a new data is inserted or the existing data is updated healthconstants foodintake package_name [mandatory] package name which provides data, assigned by the system when a new data is inserted healthconstants foodintake device_uuid [mandatory] device identifier which provides the health data healthconstants foodintake start_time [mandatory] utc milliseconds when the measurement is started healthconstants foodintake time_offset [mandatory] time offset in milliseconds which considers the time zone and daylight saving time healthconstants foodintake calorie [mandatory] total calories of the meal healthconstants foodintake amount count of food intake healthconstants foodintake unit unit used to describe the meal quantity healthconstants foodintake name name given to the meal healthconstants foodintake meal_type meal type healthconstants foodintake comment comment healthconstants foodintake 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 see also healthconstants nutrition field summary fields modifier and type field and description static string amount deprecated count of food intake static string calorie deprecated total calories of the meal in kilocalories static string comment deprecated comment for data static string food_info_id deprecated food information id static string health_data_type deprecated data type name for food intake static string meal_type deprecated meal type static int meal_type_afternoon_snack deprecated meal type for afternoon snack static int meal_type_breakfast deprecated meal type for breakfast static int meal_type_dinner deprecated meal type for dinner static int meal_type_evening_snack deprecated meal type for evening snack static int meal_type_lunch deprecated meal type for lunch static int meal_type_morning_snack deprecated meal type for morning snack static string name deprecated name given to the meal static string unit deprecated unit used to describe the meal quantity static string unit_type_default deprecated the default serving unit static string unit_type_gram deprecated gram static string unit_type_kilocalorie deprecated kilocalorie static string unit_type_not_defined deprecated not defined static string unit_type_ounce deprecated ounce fields inherited from interface com samsung android sdk healthdata healthconstants discretemeasurement 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 food_info_id static final string food_info_id deprecated food information id optional type string value length 10 ~ 32 since 1 0 0 see also constant field values amount static final string amount deprecated count of food intake if the user has two apples, amount is 2 optional type float value range 0 ~ 99999 since 1 0 0 see also constant field values calorie static final string calorie deprecated total calories of the meal in kilocalories mandatory type float value range 0 ~ 99999 since 1 0 0 see also constant field values unit static final string unit deprecated unit used to describe the meal quantity optional type string available values one of the following values as text unit_type_default unit_type_gram unit_type_ounce unit_type_kilocalorie unit_type_not_defined since 1 0 0 see also constant field values unit_type_default static final string unit_type_default deprecated the default serving unit since 1 0 0 see also unit, constant field values unit_type_gram static final string unit_type_gram deprecated gram since 1 0 0 see also unit, constant field values unit_type_ounce static final string unit_type_ounce deprecated ounce since 1 0 0 see also unit, constant field values unit_type_kilocalorie static final string unit_type_kilocalorie deprecated kilocalorie since 1 0 0 see also unit, constant field values unit_type_not_defined static final string unit_type_not_defined deprecated not defined since 1 0 0 see also unit, constant field values name static final string name deprecated name given to the meal optional type string value length 0 ~ 255 since 1 0 0 see also constant field values meal_type static final string meal_type deprecated meal type if it is not set, your data is not shown on samsung health optional type int available values one of the following values meal_type_breakfast meal_type_lunch meal_type_dinner meal_type_morning_snack meal_type_afternoon_snack meal_type_evening_snack since 1 0 0 see also constant field values meal_type_breakfast static final int meal_type_breakfast deprecated meal type for breakfast since 1 0 0 see also meal_type, constant field values meal_type_lunch static final int meal_type_lunch deprecated meal type for lunch since 1 0 0 see also meal_type, constant field values meal_type_dinner static final int meal_type_dinner deprecated meal type for dinner since 1 0 0 see also meal_type, constant field values meal_type_morning_snack static final int meal_type_morning_snack deprecated meal type for morning snack since 1 0 0 see also meal_type, constant field values meal_type_afternoon_snack static final int meal_type_afternoon_snack deprecated meal type for afternoon snack since 1 0 0 see also meal_type, constant field values meal_type_evening_snack static final int meal_type_evening_snack deprecated meal type for evening snack since 1 0 0 see also meal_type, constant field values comment static final string comment deprecated comment for data optional type string value length 0 ~ 255 since 1 0 0 see also constant field values health_data_type static final string health_data_type deprecated data type name for food intake use "com samsung health food_intake" to add permission to the manifest file see also constant field values
Develop Health
apioverviewpackageclasstreedeprecatedindex com samsung android sdk healthdata interface healthconstants weight all superinterfaces healthconstants common, healthconstants discretemeasurement enclosing class healthconstants public static interface healthconstants weight extends healthconstants discretemeasurement this interface defines weight data of the user properties properties of the following extending interfaces are available for this data type healthconstants common healthconstants discretemeasurement weight data has the following properties see more common properties by spreading this section out property name description healthconstants weight uuid [mandatory] data's unique id, assigned by the system when a new data is inserted healthconstants weight create_time [mandatory] utc milliseconds when a data is created in the health data store, assigned by the system when a new data is inserted healthconstants weight update_time [mandatory] utc milliseconds when a data is updated in the health data store, assigned by the system when a new data is inserted or the existing data is updated healthconstants weight package_name [mandatory] package name which provides data, assigned by the system when a new data is inserted healthconstants weight device_uuid [mandatory] device identifier of the source device which provides the health data healthconstants weight start_time [mandatory] utc milliseconds when data is created to the health data store when the measurement is started healthconstants weight time_offset [mandatory] time offset in milliseconds which considers the time zone and daylight saving time healthconstants weight weight [mandatory] measured weight value healthconstants weight height height healthconstants weight body_fat body fat healthconstants weight skeletal_muscle skeletal muscle healthconstants weight muscle_mass muscle mass healthconstants weight basal_metabolic_rate bmr healthconstants weight body_fat_mass body fat mass healthconstants weight fat_free_mass fat-free mass healthconstants weight fat_free fat-free ratio healthconstants weight skeletal_muscle_mass skeletal muscle mass healthconstants weight total_body_water total body water healthconstants weight comment comment healthconstants weight 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 basal_metabolic_rate bmr in kcal per day static string body_fat body fat in percentage static string body_fat_mass body fat mass in kilograms static string comment comment for data static string fat_free fat-free ratio in percentage static string fat_free_mass fat-free mass in kilograms static string health_data_type data type name for weight data static string height height in centimeters static string muscle_mass muscle mass in percentage static string skeletal_muscle skeletal muscle in percentage static string skeletal_muscle_mass skeletal muscle mass in kilograms static string total_body_water total body water in liters static string weight weight in kilograms fields inherited from interface com samsung android sdk healthdata healthconstants discretemeasurement 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 comment static final string comment comment for data optional type string value length 0 ~ 255 since 1 0 0 see also constant field values weight static final string weight weight in kilograms mandatory type float value range 2 ~ 500 since 1 0 0 see also constant field values height static final string height height in centimeters optional type float value range 20 ~ 300 since 1 0 0 see also constant field values body_fat static final string body_fat body fat in percentage total mass of fat divided by total body mass optional type float value range 1 ~ 75 since 1 2 0 see also constant field values skeletal_muscle static final string skeletal_muscle skeletal muscle in percentage total mass of skeletal muscle divided by total muscle mass optional type float value range 5 ~ 90 since 1 2 0 see also constant field values muscle_mass static final string muscle_mass muscle mass in percentage total mass of muscle divided by total body mass optional type float value range 10 ~ 99 since 1 2 0 see also constant field values basal_metabolic_rate static final string basal_metabolic_rate bmr in kcal per day optional type int value range 100 ~ 10000 since 1 2 0 see also constant field values body_fat_mass static final string body_fat_mass body fat mass in kilograms optional type float value range 2 ~ 500 since 1 3 0 see also constant field values fat_free_mass static final string fat_free_mass fat-free mass in kilograms optional type float value range 2 ~ 500 since 1 3 0 see also constant field values fat_free static final string fat_free fat-free ratio in percentage optional type float value range 0 ~ 100 since 1 3 0 see also constant field values skeletal_muscle_mass static final string skeletal_muscle_mass skeletal muscle mass in kilograms optional type float value range 2 ~ 500 since 1 3 0 see also constant field values total_body_water static final string total_body_water total body water in liters optional type float value range 2 ~ 500 since 1 3 0 see also constant field values health_data_type static final string health_data_type data type name for weight data use "com samsung health weight" to add permission to the manifest file see also constant field values
Develop Health
apioverviewpackageclasstreedeprecatedindex com samsung android sdk healthdata interface healthconstants foodinfo all superinterfaces healthconstants common enclosing class healthconstants deprecated use healthconstants nutrition instead of it this data type will be removed do not use it any more public static interface healthconstants foodinfo extends healthconstants common this interface defines food info that indicates healthconstants foodintake's nutritional information readable foodinfo data through this interface is different with the food's search result on the samsung health's food tracker linked food info data to the saved food intake data can be retrieved only properties properties of the following extending interfaces are available for this data type healthconstants common food info data has the following properties see more common properties by spreading this section out property name description healthconstants foodinfo uuid [mandatory] data's unique id, assigned by the system when a new data is inserted it is used to show nutritional information of food intake on samsung health if you set this value as healthconstants foodintake food_info_id healthconstants foodinfo create_time [mandatory] utc milliseconds when a data is created in the health data store, assigned by the system when a new data is inserted healthconstants foodinfo update_time [mandatory] utc milliseconds when a data is updated in the health data store, assigned by the system when a new data is inserted or the existing data is updated healthconstants foodinfo package_name [mandatory] package name which provides data, assigned by the system when a new data is inserted healthconstants foodinfo device_uuid [mandatory] device identifier which provides the health data healthconstants foodinfo provider_food_id [mandatory] provider's food id healthconstants foodinfo name [mandatory] food name healthconstants foodinfo calorie [mandatory] calories healthconstants foodinfo info_provider provider name healthconstants foodinfo description description healthconstants foodinfo metric_serving_amount amount of the food served healthconstants foodinfo metric_serving_unit unit name for the food quantity healthconstants foodinfo unit_count_per_calorie number of unit in one kilocalorie healthconstants foodinfo total_fat total fat healthconstants foodinfo saturated_fat saturated fat healthconstants foodinfo polysaturated_fat polyunsaturated fat healthconstants foodinfo monosaturated_fat monounsaturated fat healthconstants foodinfo trans_fat trans fat healthconstants foodinfo carbohydrate carbohydrate healthconstants foodinfo dietary_fiber dietary fiber healthconstants foodinfo sugar sugar or glucose healthconstants foodinfo protein protein healthconstants foodinfo unit_count_per_calorie number of unit in one kilocalorie healthconstants foodinfo cholesterol cholesterol healthconstants foodinfo sodium sodium healthconstants foodinfo potassium potassium healthconstants foodinfo vitamin_a vitamin a healthconstants foodinfo vitamin_c vitamin c healthconstants foodinfo calcium calcium healthconstants foodinfo iron iron healthconstants foodinfo serving_description description of serving content healthconstants foodinfo default_number_of_serving_unit default number of the served healthconstants foodinfo 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 see also healthconstants nutrition field summary fields modifier and type field and description static string calcium deprecated calcium amount in percent static string calorie deprecated calories in kilocalories static string carbohydrate deprecated carbohydrate amount in grams static string cholesterol deprecated cholesterol amount in milligrams static string default_number_of_serving_unit deprecated default number of the served food static string description deprecated description of the food static string dietary_fiber deprecated dietary fiber amount in grams static string health_data_type deprecated data type name for food information static string info_provider deprecated provider name of food information static string iron deprecated iron amount in percent static string metric_serving_amount deprecated amount of the food served static string metric_serving_unit deprecated unit name for the food quantity to be measured static string monosaturated_fat deprecated monounsaturated fat amount in grams static string name deprecated food name static string polysaturated_fat deprecated polyunsaturated fat amount in grams static string potassium deprecated potassium amount in milligrams static string protein deprecated protein amount in grams static string provider_food_id deprecated food id that is unique in the same info_provider static string saturated_fat deprecated saturated fat amount in grams static string serving_description deprecated description of serving content in the food static string sodium deprecated sodium amount in milligrams static string sugar deprecated sugar or glucose amount in grams static string total_fat deprecated total fat amount in grams static string trans_fat deprecated trans fat amount in grams static string unit_count_per_calorie deprecated number of unit in one kilocalorie static string vitamin_a deprecated vitamin a amount in percent static string vitamin_c deprecated vitamin c amount in percent fields inherited from interface com samsung android sdk healthdata healthconstants common create_time, custom, device_uuid, package_name, update_time, uuid field detail provider_food_id static final string provider_food_id deprecated food id that is unique in the same info_provider mandatory type string value length 1 ~ 64 since 1 0 0 see also constant field values info_provider static final string info_provider deprecated provider name of food information optional type string value length 1 ~ 255 since 1 0 0 see also constant field values name static final string name deprecated food name mandatory type string value length 0 ~ 255 since 1 0 0 see also constant field values calorie static final string calorie deprecated calories in kilocalories mandatory type float value range 0 ~ 99999 since 1 0 0 see also constant field values description static final string description deprecated description of the food optional type string value length 0 ~ 255 since 1 0 0 see also constant field values metric_serving_amount static final string metric_serving_amount deprecated amount of the food served in case of 300 grams for an apple, its metric_serving_amount is 300 and its metric_serving_unit is "g" optional type int value range 0 and above since 1 0 0 see also constant field values metric_serving_unit static final string metric_serving_unit deprecated unit name for the food quantity to be measured optional type string available values one of the following values as text "g" "ml" since 1 0 0 see also constant field values total_fat static final string total_fat deprecated total fat amount in grams optional type float value range 0 ~ 9999 since 1 0 0 see also constant field values saturated_fat static final string saturated_fat deprecated saturated fat amount in grams optional type float value range 0 ~ 9999 since 1 0 0 see also constant field values polysaturated_fat static final string polysaturated_fat deprecated polyunsaturated fat amount in grams optional type float value range 0 ~ 9999 since 1 0 0 see also constant field values monosaturated_fat static final string monosaturated_fat deprecated monounsaturated fat amount in grams optional type float value range 0 ~ 9999 since 1 0 0 see also constant field values trans_fat static final string trans_fat deprecated trans fat amount in grams optional type float value range 0 ~ 9999 since 1 0 0 see also constant field values carbohydrate static final string carbohydrate deprecated carbohydrate amount in grams optional type float value range 0 ~ 9999 since 1 0 0 see also constant field values dietary_fiber static final string dietary_fiber deprecated dietary fiber amount in grams optional type float value range 0 ~ 9999 since 1 0 0 see also constant field values sugar static final string sugar deprecated sugar or glucose amount in grams optional type float value range 0 ~ 9999 since 1 0 0 see also constant field values protein static final string protein deprecated protein amount in grams optional type float value range 0 ~ 9999 since 1 0 0 see also constant field values unit_count_per_calorie static final string unit_count_per_calorie deprecated number of unit in one kilocalorie optional type float value range 0 ~ 9999 since 1 0 0 see also constant field values cholesterol static final string cholesterol deprecated cholesterol amount in milligrams optional type float value range 0 ~ 10000 since 1 0 0 see also constant field values sodium static final string sodium deprecated sodium amount in milligrams optional type float value range 0 ~ 10000 since 1 0 0 see also constant field values potassium static final string potassium deprecated potassium amount in milligrams optional type float value range 0 ~ 10000 since 1 0 0 see also constant field values vitamin_a static final string vitamin_a deprecated vitamin a amount in percent optional type float value range 0 ~ 9999 since 1 0 0 see also constant field values vitamin_c static final string vitamin_c deprecated vitamin c amount in percent optional type float value range 0 ~ 9999 since 1 0 0 see also constant field values calcium static final string calcium deprecated calcium amount in percent optional type float value range 0 ~ 9999 since 1 0 0 see also constant field values iron static final string iron deprecated iron amount in percent optional type float value range 0 ~ 9999 since 1 0 0 see also constant field values serving_description static final string serving_description deprecated description of serving content in the food e g 200 grams per one meal optional type string value length 0 ~ 255 since 1 0 0 see also constant field values default_number_of_serving_unit static final string default_number_of_serving_unit deprecated default number of the served food optional type int value range 0 ~ 9999 since 1 0 0 see also constant field values health_data_type static final string health_data_type deprecated data type name for food information use "com samsung health food_info" to add permission to the manifest file see also constant field values
Develop Health
apioverviewpackageclasstreedeprecatedindex com samsung android sdk healthdata class healthdataresolver aggregaterequest builder java lang object com samsung android sdk healthdata healthdataresolver aggregaterequest builder enclosing interface healthdataresolver aggregaterequest public static class healthdataresolver aggregaterequest builder extends object this class creates an healthdataresolver aggregaterequest's instance for the specified data type since 1 0 0 constructor summary constructors constructor and description builder helps to construct a healthdataresolver aggregaterequest object method summary all methods instance methods concrete methods modifier and type method and description healthdataresolver aggregaterequest builder addfunction healthdataresolver aggregaterequest aggregatefunction aggregate, string property, string alias adds a required aggregation function healthdataresolver aggregaterequest builder addgroup string property, string alias adds a group with a property name for the aggregate request healthdataresolver aggregaterequest build builds a new healthdataresolver aggregaterequest object healthdataresolver aggregaterequest builder setdatatype string type sets a health data type for the aggregate request healthdataresolver aggregaterequest builder setfilter healthdataresolver filter filter sets a filter for the aggregate request healthdataresolver aggregaterequest builder setlocaltimerange string timeproperty, string offsetproperty, long begin, long end sets the local time range not to miss data from the query's result when there exist data with a different time_offset in the saved health data healthdataresolver aggregaterequest builder setpackagename string packagename sets the package name that provides health data for the aggregate request healthdataresolver aggregaterequest builder setsort string property, healthdataresolver sortorder sortorder sets the sort order for a given property name or alias healthdataresolver aggregaterequest builder setsourcedevices list<string> uuidlist sets a uuid list for source devices for the aggregate request healthdataresolver aggregaterequest builder settimegroup healthdataresolver aggregaterequest timegroupunit unit, int amount, string timeproperty, string alias sets a group with healthdataresolver aggregaterequest timegroupunit for the aggregate request healthdataresolver aggregaterequest builder settimegroup healthdataresolver aggregaterequest timegroupunit unit, int amount, string timeproperty, string offsetproperty, string alias sets a group with healthdataresolver aggregaterequest timegroupunit and the time offset for the aggregate request constructor detail builder public builder helps to construct a healthdataresolver aggregaterequest object since 1 0 0 method detail setdatatype public healthdataresolver aggregaterequest builder setdatatype string type sets a health data type for the aggregate request it has to be specified before calling build parameters type - health_data_type of data type returns the object that applies the data type since 1 0 0 setfilter public healthdataresolver aggregaterequest builder setfilter healthdataresolver filter filter sets a filter for the aggregate request parameters filter - the filter object returns the object that applies the filter since 1 0 0 setpackagename public healthdataresolver aggregaterequest builder setpackagename string packagename sets the package name that provides health data for the aggregate request parameters packagename - the package name returns the object that applies the package name since 1 0 0 setsourcedevices public healthdataresolver aggregaterequest builder setsourcedevices list<string> uuidlist sets a uuid list for source devices for the aggregate request parameters uuidlist - the uuid list for source devices returns the object that applies source devices since 1 0 0 settimegroup public healthdataresolver aggregaterequest builder settimegroup healthdataresolver aggregaterequest timegroupunit unit, int amount, string timeproperty, string alias sets a group with healthdataresolver aggregaterequest timegroupunit for the aggregate request it makes its result contain grouped values by the specified time unit refer to the related example parameters unit - the time group unit amount - the amount for grouping by the time group unit if you set a healthdataresolver aggregaterequest builder object with following configuration, time group unit healthdataresolver aggregaterequest timegroupunit hourly amount 8 time range 00 00 ~ 09 00 of today the aggregate result contains 2 values that are grouped by 8 hours the first result value is for 00 00 ~ 08 00 and the second one is for 08 00 - 09 00 the amount value for each time group unit is defined in advance be mindful to use only the values below healthdataresolver aggregaterequest timegroupunit minutely - 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60 healthdataresolver aggregaterequest timegroupunit hourly - 1, 2, 3, 4, 6, 8, 12, 24 healthdataresolver aggregaterequest timegroupunit daily - 1 healthdataresolver aggregaterequest timegroupunit weekly - 1 healthdataresolver aggregaterequest timegroupunit monthly - 1, 3, 6 timeproperty - the time property name that its values are grouped in the result alias - the alias for the time property to check the result returns the object that applies the time group since 1 0 0 settimegroup public healthdataresolver aggregaterequest builder settimegroup healthdataresolver aggregaterequest timegroupunit unit, int amount, string timeproperty, string offsetproperty, string alias sets a group with healthdataresolver aggregaterequest timegroupunit and the time offset for the aggregate request it makes its result contain grouped values by the specified time unit refer to the related example parameters unit - the time group unit amount - the amount for grouping by the time group unit if you set a healthdataresolver aggregaterequest builder object with following configuration, time group unit healthdataresolver aggregaterequest timegroupunit hourly amount 8 time range 00 00 ~ 09 00 of today the aggregate result contains 2 values that are grouped by 8 hours the first result value is for 00 00 ~ 08 00 and the second one is for 08 00 - 09 00 the amount value for each time group unit is defined in advance be mindful to use only the values below healthdataresolver aggregaterequest timegroupunit minutely - 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60 healthdataresolver aggregaterequest timegroupunit hourly - 1, 2, 3, 4, 6, 8, 12, 24 healthdataresolver aggregaterequest timegroupunit daily - 1 healthdataresolver aggregaterequest timegroupunit weekly - 1 healthdataresolver aggregaterequest timegroupunit monthly - 1, 3, 6 timeproperty - the time property name that its values are grouped in the result offsetproperty - the time offset property which represents the time offset for the target time property alias - the alias for the time property to check the result returns the object that applies the time group since 1 0 0 addgroup public healthdataresolver aggregaterequest builder addgroup string property, string alias adds a group with a property name for the aggregate request parameters property - the property to get grouped values in the aggregate result alias - the alias for the property to check the result returns the object that applies the property name since 1 0 0 addfunction public healthdataresolver aggregaterequest builder addfunction healthdataresolver aggregaterequest aggregatefunction aggregate, string property, string alias adds a required aggregation function it has to be specified before calling build parameters aggregate - the aggregate function property - the property name for the aggregate function in case of count, "*" is allowed alias - the alias for the property to check the result returns the object that applies the aggregation function since 1 0 0 setsort public healthdataresolver aggregaterequest builder setsort string property, healthdataresolver sortorder sortorder sets the sort order for a given property name or alias parameters property - the property name or alias to be sorted if it's null, the result is not ordered sortorder - the sort order if it's null, the result is ordered with the default sort order returns the object that applies the sort order since 1 0 0 setlocaltimerange public healthdataresolver aggregaterequest builder setlocaltimerange string timeproperty, string offsetproperty, long begin, long end sets the local time range not to miss data from the query's result when there exist data with a different time_offset in the saved health data the data that has a different time_offset with other data's time_offset can be saved when the daylight time is applied or the user moves to another region by like a travel building a complete query to aggregate all data including the different time_offset is not easy use this api to build an aggregate request as possible parameters timeproperty - the time property name that needs to add a filter offsetproperty - the time offset property begin - the beginning time of the local time range in milliseconds its minimum value is long min_value end - the end time of the local time range in milliseconds its maximum value is long max_value returns the object that applies the local time range since 1 3 0 build public healthdataresolver aggregaterequest build builds a new healthdataresolver aggregaterequest object check if following information is specified data type aggregate function returns the healthdataresolver aggregaterequest object throws illegalstateexception - if enough information is not specified since 1 0 0 see also setdatatype string , addfunction healthdataresolver aggregaterequest aggregatefunction, string, string
Develop Health
apioverviewpackageclasstreedeprecatedindex com samsung android sdk healthdata interface healthconstants exercise all superinterfaces healthconstants common, healthconstants sessionmeasurement enclosing class healthconstants public static interface healthconstants exercise extends healthconstants sessionmeasurement this interface defines exercise data of the user properties properties of the following extending interfaces are available for this data type healthconstants common healthconstants sessionmeasurement exercise data has the following properties see more common properties by spreading this section out property name description healthconstants exercise uuid [mandatory] data's unique id, assigned by the system when a new data is inserted healthconstants exercise create_time [mandatory] utc milliseconds when a data is created in the health data store, assigned by the system when a new data is inserted healthconstants exercise update_time [mandatory] utc milliseconds when a data is updated in the health data store, assigned by the system when a new data is inserted or the existing data is updated healthconstants exercise package_name [mandatory] package name which provides data, assigned by the system when a new data is inserted healthconstants exercise device_uuid [mandatory] device identifier which provides the health data healthconstants exercise start_time [mandatory] utc milliseconds when the measurement is started healthconstants exercise end_time [mandatory] utc milliseconds after the measurement has ended if the samsung health's exercise data has the same start_time and end_time, it means the user didn't select the "pause" or "stop" button yet on samsung health healthconstants exercise time_offset [mandatory] time offset in milliseconds which considers the time zone and daylight saving time healthconstants exercise exercise_type [mandatory] predefined exercise type healthconstants exercise exercise_custom_type custom exercise type healthconstants exercise calorie [mandatory] burned calorie healthconstants exercise duration [mandatory] duration of this exercise healthconstants exercise distance distance healthconstants exercise altitude_gain increased altitude during the activity healthconstants exercise altitude_loss decreased altitude during the activity healthconstants exercise count count of a repetitive action healthconstants exercise count_type type of the count healthconstants exercise max_speed maximum speed healthconstants exercise mean_speed mean speed healthconstants exercise max_caloricburn_rate maximum rate of burned calories healthconstants exercise mean_caloricburn_rate mean rate of burned calories healthconstants exercise max_cadence maximum cadence rate healthconstants exercise mean_cadence mean cadence rate healthconstants exercise max_heart_rate maximum heart rate healthconstants exercise mean_heart_rate mean heart rate healthconstants exercise min_heart_rate minimum heart rate healthconstants exercise max_altitude maximum altitude healthconstants exercise min_altitude minimum altitude healthconstants exercise incline_distance uphill distance healthconstants exercise decline_distance downhill distance healthconstants exercise max_power maximum power healthconstants exercise mean_power mean power healthconstants exercise mean_rpm mean rpm revolutions per minute healthconstants exercise max_rpm max rpm revolutions per minute healthconstants exercise live_data live data e g heart rate, speed, power, and so on during exercise healthconstants exercise location_data location trajectory data during exercise healthconstants exercise vo2_max maximal oxygen consumption during exercise healthconstants exercise comment comment healthconstants exercise additional additional info to express exercise's details healthconstants exercise 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 additional additional info to express exercise's details static string altitude_gain increased altitude during the activity in meters static string altitude_loss decreased altitude during the activity in meters static string calorie burned calorie during the activity in kilocalories static string comment comment for data static string count count of a repetitive action, such as the revolution count of the bicycle pedal or striding count of a runner or walker static string count_type type of the count static int count_type_repetition general repetition type static int count_type_stride stride or step cadence type static int count_type_stroke stroke cadence type static int count_type_swing swing cadence type static string decline_distance downhill distance during the activity in meters static string distance distance covered during the exercise in meters static string duration duration of this exercise in milliseconds static string exercise_custom_type custom exercise type static string exercise_type predefined exercise type static string health_data_type data type name for exercise static string incline_distance uphill distance during the activity in meters static string live_data live data e g heart rate, speed, power, and so on during exercise which is formatted with json and compressed data static string location_data location trajectory data during exercise which is formatted with json and compressed data static string max_altitude maximum altitude in meters static string max_cadence maximum cadence rate per minute static string max_caloricburn_rate maximum rate of burned calories in kilocalories per hour static string max_heart_rate maximum heart rate per minute static string max_power maximum power in watts static string max_rpm max rpm revolutions per minute static string max_speed maximum speed in meters per second static string mean_cadence mean cadence rate per minute static string mean_caloricburn_rate mean rate of burned calories in kilocalories per hour static string mean_heart_rate mean heart rate per minute static string mean_power mean power in watts static string mean_rpm mean rpm revolutions per minute static string mean_speed mean speed in meters per second static string min_altitude minimum altitude in meters static string min_heart_rate minimum heart rate per minute static string vo2_max maximal oxygen consumption during exercise 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 exercise_type static final string exercise_type predefined exercise type your application's exercise data is shown on samsung health if the data sets this value if you cannot find a proper exercise type in predefined types, set the value as 0 and set exercise_custom_type instead of it mandatory type int available values predefined types since 1 0 0 see also constant field values exercise_custom_type static final string exercise_custom_type custom exercise type define its value as fqdn, e g "com yourcompany exercise type exercise_name" this property has to be used only when you cannot find a required exercise type in predefined types if this custom type is used, set the value of exercise_type as 0 your custom health data is inserted to the health data store but it is not shown in samsung health optional type string value length 1 ~ 255 since 1 0 0 see also constant field values distance static final string distance distance covered during the exercise in meters optional type float value range 0 ~ 2000000 since 1 0 0 see also constant field values calorie static final string calorie burned calorie during the activity in kilocalories mandatory type float value range 0 ~ 1000000 since 1 0 0 see also constant field values duration static final string duration duration of this exercise in milliseconds mandatory type long value range 0 ~ 86400000 since 1 0 0 see also constant field values altitude_gain static final string altitude_gain increased altitude during the activity in meters optional type float value range 0 ~ 10000 since 1 0 0 see also constant field values altitude_loss static final string altitude_loss decreased altitude during the activity in meters optional type float value range 0 ~ 10000 since 1 0 0 see also constant field values count static final string count count of a repetitive action, such as the revolution count of the bicycle pedal or striding count of a runner or walker optional type int value range 0 ~ 1000000 since 1 0 0 see also count_type, constant field values count_type static final string count_type type of the count optional type int available values one of the following values count_type_stride count_type_stroke count_type_swing count_type_repetition since 1 0 0 see also constant field values count_type_stride static final int count_type_stride stride or step cadence type its constant value is 30001 since 1 0 0 see also count_type, constant field values count_type_stroke static final int count_type_stroke stroke cadence type its constant value is 30002 since 1 0 0 see also count_type, constant field values count_type_swing static final int count_type_swing swing cadence type its constant value is 30003 since 1 0 0 see also count_type, constant field values count_type_repetition static final int count_type_repetition general repetition type its constant value is 30004 since 1 3 0 see also count_type, constant field values max_speed static final string max_speed maximum speed in meters per second optional type float value range 0 ~ 140 since 1 0 0 see also constant field values mean_speed static final string mean_speed mean speed in meters per second optional type float value range 0 ~ 140 since 1 0 0 see also constant field values max_caloricburn_rate static final string max_caloricburn_rate maximum rate of burned calories in kilocalories per hour optional type float value range 0 ~ 1000000 since 1 0 0 see also constant field values mean_caloricburn_rate static final string mean_caloricburn_rate mean rate of burned calories in kilocalories per hour optional type float value range 0 ~ 1000000 since 1 0 0 see also constant field values max_cadence static final string max_cadence maximum cadence rate per minute e g the cadence indicates steps per minute for running exercise optional type float value range 0 ~ 500000 since 1 0 0 see also constant field values mean_cadence static final string mean_cadence mean cadence rate per minute e g the cadence indicates steps per minute for running exercise optional type float value range 0 ~ 500000 since 1 0 0 see also constant field values max_heart_rate static final string max_heart_rate maximum heart rate per minute optional type float value range 0 ~ 300 since 1 0 0 see also constant field values mean_heart_rate static final string mean_heart_rate mean heart rate per minute optional type float value range 0 ~ 300 since 1 0 0 see also constant field values min_heart_rate static final string min_heart_rate minimum heart rate per minute optional type float value range 0 ~ 300 since 1 2 0 see also constant field values max_altitude static final string max_altitude maximum altitude in meters optional type float value range -1000 ~ 10000 since 1 0 0 see also constant field values min_altitude static final string min_altitude minimum altitude in meters optional type float value range -1000 ~ 10000 since 1 0 0 see also constant field values incline_distance static final string incline_distance uphill distance during the activity in meters optional type float value range 0 ~ 1000000 since 1 0 0 see also constant field values decline_distance static final string decline_distance downhill distance during the activity in meters optional type float value range 0 ~ 1000000 since 1 0 0 see also constant field values max_power static final string max_power maximum power in watts optional type float value range 0 ~ 999 since 1 0 0 see also constant field values mean_power static final string mean_power mean power in watts optional type float value range 0 ~ 999 since 1 0 0 see also constant field values mean_rpm static final string mean_rpm mean rpm revolutions per minute optional type float value range 0 ~ 100000 since 1 2 1 see also constant field values max_rpm static final string max_rpm max rpm revolutions per minute optional type float value range 0 ~ 100000 since 1 3 0 see also constant field values live_data static final string live_data live data e g heart rate, speed, power, and so on during exercise which is formatted with json and compressed data optional type byte[] maximum data size 1000 kb live data can have one or more segments e g samsung health starts the exercise data record when the user starts a specified exercise it makes several segments to live data for each specific period when the user tabs the 'stop' button finally it finishes the exercise data record each segment is composed of the following json keys json key type unit mandatory "start_time" long utc millisecond recommended set this value if you save live_data "heart_rate" float beat per minute recommended set one or more values if you save live_data "cadence" float rate per minute "count" int - "power" float watt "speed" float meter per second "distance" float meter the following example shows the json format for live_data { "start_time" 1422457096536, "heart_rate" 147 48181, "cadence" 95 84712, "count" 83, "power" 99 50436, "speed" 11 061617, "distance" 250 } especially, each segment's "count" and "distance" in live data are accumulated values to the each segment's "start_time"unlike other values such as "heart_rate" and "cadence" that indicate the measured value at the point of each segment's "start_time" compressed json conversion can be converting data to compressed json getting data from compressed json since 1 0 0 see also healthdatautil, constant field values location_data static final string location_data location trajectory data during exercise which is formatted with json and compressed data it follows wgs 84 optional type byte[] maximum data size 1000 kb location data can have one or more segment each segment is composed of the following json keys json key type mandatory "start_time" long recommended,set this value if you save location_data "latitude" float recommended,set this value if you save location_data "longitude" float recommended,set this value if you save location_data "altitude" float no "accuracy" float no the following example shows the json format for location_data { "start_time" 1422457096536, "latitude" 2 7413864, "longitude" 60 37224, "altitude" 39 0, "accuracy" 0 0 } compressed json conversion can be converting data to compressed json getting data from compressed json since 1 0 0 see also healthdatautil, constant field values vo2_max static final string vo2_max maximal oxygen consumption during exercise optional type float value range 0 ~ 100 since 1 5 0 see also constant field values comment static final string comment comment for data optional type string value length 0 ~ 255 since 1 0 0 see also constant field values additional static final string additional additional info to express exercise's details it is formatted with json and compressed data it's different for each exercise kind compressed json conversion can be converting data to compressed json getting data from compressed json swimming's additional info swimming's detailed information is defined with the following json keys json key type unit mandatory remarks "pool_length" int - yes 20 | 50 | "pool_length_unit" string - yes one of the following value "meter" "yard" "total_distance" float meter yes "total_duration" int millisecond yes "lengths" array - no array of length a length is the distance from one end of a swimming pool to the other each length's detailed information is defined with the following json keys json key type unit mandatory description "duration" int millisecond yes duration value of this length "stroke_count" int - yes stroke count value of this length "stroke_type" string - yes stroke type value of this length one of the following value "freestyle" "butterfly" "backstroke" "breaststroke" "mixed" "interval" int - yes interval value it starts from 1 and increments by 1 see swimming data's example additional info { "pool_length" 25, "pool_length_unit" "meter", "total_distance" 125, "total_duration" 247000, "lengths" [ { "duration" 49000, "interval" 1, "stroke_count" 20, "stroke_type" "butterfly" }, { "duration" 42000, "interval" 1, "stroke_count" 21, "stroke_type" "backstroke" }, { "duration" 51000, "interval" 1, "stroke_count" 26, "stroke_type" "breaststroke" }, { "duration" 52000, "interval" 2, "stroke_count" 27, "stroke_type" "freestyle" }, { "duration" 53000, "interval" 2, "stroke_count" 29, "stroke_type" "mixed" } ] } since 1 3 0 see also constant field values health_data_type static final string health_data_type data type name for exercise use "com samsung health exercise" to add permission to the manifest file since 1 0 0 see also constant field values
Develop Health
apioverviewpackageclasstreedeprecatedindex com samsung android sdk healthdata interface healthdataresolver aggregaterequest enclosing class healthdataresolver public static interface healthdataresolver aggregaterequest this interface represents an aggregate request with aggregate functions and the specified time unit to group result values request for aggregating data healthdataresolver aggregate helps that your application aggregates samsung health's data the following information is mandatory to build an aggregaterequest instance mandatory information description data type set the data type with aggregaterequest builder setdatatype aggregate function add an aggregate function with aggregaterequest builder addfunction you can make a request instance with healthdataresolver aggregaterequest builder build example aggregate function to know the average body temperature by tags, you can set an aggregaterequest object with setdatatype addfunction addgroup public class healthdataresolverexample { // the state of connection private healthdatastore mstore; public static final string app_tag = "myapp"; private void getaveragetemperaturebytag long starttime, long endtime { healthdataresolver aggregaterequest request = new healthdataresolver aggregaterequest builder setdatatype healthconstants bodytemperature health_data_type addfunction healthdataresolver aggregaterequest aggregatefunction avg, healthconstants bodytemperature temperature, "avr_temperature" addgroup healthconstants bodytemperature comment, "tag" setlocaltimerange healthconstants bodytemperature start_time, healthconstants bodytemperature time_offset, starttime, endtime build ; the aggregate request can be sent with a listener asynchronously healthdataresolver resolver = new healthdataresolver mstore, null ; try { resolver aggregate request setresultlistener mtempaggrresult ; } catch exception e { log d app_tag, "aggregating health data fails " ; } } the result includes following values grouped with comment as tag alias average temperature value for each tag as avr_temperature alias private final healthresultholder resultlistener<healthdataresolver aggregateresult> mtempaggrresult= new healthresultholder resultlistener<healthdataresolver aggregateresult> { @override public void onresult healthdataresolver aggregateresult result { try { iterator<healthdata> iterator = result iterator ; if iterator hasnext { healthdata data = iterator next ; // gets the tag name string tag = data getstring "tag" ; // gets the average temperature float temperature = data getfloat "avr_temperature" ; // } } finally { result close ; } } }; } example aggregate function and time group you can set an aggregaterequest object with setdatatype addfunction settimegroup setsort if you want to get the daily glucose average value, create an aggregaterequest object as the following example public class healthdataresolverexample { // the state of connection private healthdatastore mstore; public static final string app_tag = "myapp"; private void getdailyglucose long starttime, long endtime { healthdataresolver aggregaterequest request = new healthdataresolver aggregaterequest builder setdatatype healthconstants bloodglucose health_data_type addfunction healthdataresolver aggregaterequest aggregatefunction avg, healthconstants bloodglucose glucose, "average" settimegroup healthdataresolver aggregaterequest timegroupunit daily, 1, healthconstants bloodglucose start_time, healthconstants bloodglucose time_offset, "day" setlocaltimerange healthconstants bloodglucose start_time, healthconstants bloodglucose time_offset, starttime, endtime setsort "days", healthdataresolver sortorder desc build ; the aggregate request can be sent with a listener asynchronously healthdataresolver resolver = new healthdataresolver mstore, null ; try { resolver aggregate request setresultlistener mglucoseaggrresult ; } catch exception e { log d app_tag, "aggregating health data fails " ; } } the result includes following values grouped with daily time unit as day alias average blood glucose value for each day as average alias sorted with desc private final healthresultholder resultlistener<healthdataresolver aggregateresult> mglucoseaggrresult = new healthresultholder resultlistener<healthdataresolver aggregateresult> { @override public void onresult healthdataresolver aggregateresult result { try { iterator<healthdata> iterator = result iterator ; if iterator hasnext { healthdata data = iterator next ; // gets day information string tag = data getstring "day" ; // gets the average glucose float avg = data getfloat "average" ; // } } finally { result close ; } }; } since 1 0 0 nested class summary nested classes modifier and type interface and description static class healthdataresolver aggregaterequest aggregatefunction this enumeration defines useful aggregate functions static class healthdataresolver aggregaterequest builder this class creates an healthdataresolver aggregaterequest's instance for the specified data type static class healthdataresolver aggregaterequest timegroupunit this enumeration defines time units to group values of the aggregate result
Develop Health
apioverviewpackageclasstreedeprecatedindex com samsung android sdk healthdata interface healthconstants sleepstage all superinterfaces healthconstants common, healthconstants sessionmeasurement enclosing class healthconstants public static interface healthconstants sleepstage extends healthconstants sessionmeasurement this interface defines the detailed sleep stage for the specified sleep data stages of sleep during sleep, the user's body alternates between two types of sleep nrem non-rapid eye movement and rem rapid eye movement sleep nrem sleep consists of the following stages - light in light sleep, the user transits from wakefulness to sleep the user's breading and heart rate become regular and the user's body temperature drops - deep in deep sleep, the user becomes less responsive to the user's surroundings the user's breathing slows and his/her muscles are more relaxed this is the stage when the user's body restores and recharges itself in rem sleep, the user's body is relaxed and immobile while the user's brain becomes more active and re-energizes itself for the next day this is the stage when the majority of the user's dreams occur awake includes the times you wake up briefly and the periods the user is restless during a sleep sleep and sleep stage healthconstants sleep includes only the start and end time of the user's sleep sleepstage gives detailed sleep stage information with several sections for the specified sleep data the sleep stage can be presented as the following figure sleep #1 sleep data is saved as "sleep #1" if healthconstants sleep is used only sleep #2 otherwise, "sleep #2" data that is composed of healthconstants sleep and healthconstants sleepstage it shows the user goes to bed at 23 30 the his/her sleep stage is sleep_light for 23 30 ~ 00 40 of the next day the his/her sleep stage is sleep_deep for 00 40 ~ 02 00 the his/her sleep stage is sleep_rem for 02 00 ~ 05 10 the his/her sleep stage is sleep_awake for 05 10 ~ 06 30 he/she awakes at 06 30 properties properties of the following extending interfaces are available for this data type healthconstants common healthconstants sessionmeasurement sleep stage data has the following properties see more common properties by spreading this section out property name description healthconstants sleepstage uuid [mandatory] data's unique id, assigned by the system when a new data is inserted healthconstants sleepstage create_time [mandatory] utc milliseconds when a data is created in the health data store, assigned by the system when a new data is inserted healthconstants sleepstage update_time [mandatory] utc milliseconds when a data is updated in the health data store, assigned by the system when a new data is inserted or the existing data is updated healthconstants sleepstage package_name [mandatory] package name which provides data, assigned by the system when a new data is inserted healthconstants sleepstage device_uuid [mandatory] device identifier which provides the health data healthconstants sleepstage start_time [mandatory] utc milliseconds when the measurement is started healthconstants sleepstage end_time [mandatory] utc milliseconds after the measurement has ended healthconstants sleepstage time_offset [mandatory] time offset in milliseconds which considers the time zone and daylight saving time healthconstants sleepstage sleep_id [mandatory] the specified sleep data's id healthconstants sleepstage stage [mandatory] sleep stage healthconstants sleepstage 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 2 0 see also healthconstants sleep field summary fields modifier and type field and description static string health_data_type data type name for sleep stage data static string sleep_id the specified sleep data's id static string stage sleep stage static int stage_awake awaken stage of sleep static int stage_deep deep stage of sleep static int stage_light light stage of sleep static int stage_rem rem rapid eye movement stage of sleep 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 sleep_id static final string sleep_id the specified sleep data's id set this property with uuid of healthconstants sleep it's the id of "sleep #2" data in the example figure mandatory type string value length 10 ~ 36 since 1 2 0 see also constant field values stage static final string stage sleep stage mandatory type int available values one of the following values stage_awake stage_light stage_deep stage_rem since 1 2 0 see also constant field values stage_awake static final int stage_awake awaken stage of sleep stage_awake includes the times you wake up briefly and the periods the user is restless during a sleep its constant value is 40001 since 1 2 0 see also stage, constant field values stage_light static final int stage_light light stage of sleep in stage_light, the user transits from wakefulness to sleep the user's breading and heart rate become regular and the user's body temperature drops its constant value is 40002 since 1 2 0 see also stage, constant field values stage_deep static final int stage_deep deep stage of sleep in stage_deep, the user becomes less responsive to the user's surroundings the user's breathing slows and his/her muscles are more relaxed this is the stage when the user's body restores and recharges itself its constant value is 40003 since 1 2 0 see also stage, constant field values stage_rem static final int stage_rem rem rapid eye movement stage of sleep in stage_rem, the user's body is relaxed and immobile while the user's brain becomes more active and re-energizes itself for the next day this is the stage when the majority of the user's dreams occur its constant value is 40004 since 1 2 0 see also stage, constant field values health_data_type static final string health_data_type data type name for sleep stage data use "com samsung health sleep_stage" to add permission to the manifest file since 1 2 0 see also constant field values
Develop Health
apioverviewpackageclasstreedeprecatedindex com samsung android sdk healthdata interface healthconstants nutrition all superinterfaces healthconstants common, healthconstants discretemeasurement enclosing class healthconstants public static interface healthconstants nutrition extends healthconstants discretemeasurement this interface defines nutrition user intakes properties of the following extending interfaces are available for this data type healthconstants common healthconstants discretemeasurement properties properties of the following extending interfaces are available for this data type healthconstants common nutirition data has the following properties see more common properties by spreading this section out property name description healthconstants nutrition uuid [mandatory] data's unique id, assigned by the system when a new data is inserted it is used to show nutritional information user intake on samsung health healthconstants nutrition create_time [mandatory] utc milliseconds when a data is created in the health data store, assigned by the system when a new data is inserted healthconstants nutrition update_time [mandatory] utc milliseconds when a data is updated in the health data store, assigned by the system when a new data is inserted or the existing data is updated healthconstants nutrition package_name [mandatory] package name which provides data, assigned by the system when a new data is inserted healthconstants nutrition device_uuid [mandatory] device identifier which provides the health data healthconstants nutrition start_time [mandatory] utc milliseconds when the measurement is started healthconstants nutrition time_offset [mandatory] time offset in milliseconds which considers the time zone and daylight saving time healthconstants nutrition meal_type [mandatory] meal type healthconstants nutrition calorie [mandatory] calories healthconstants nutrition title title healthconstants nutrition total_fat total fat healthconstants nutrition saturated_fat saturated fat healthconstants nutrition polysaturated_fat polyunsaturated fat healthconstants nutrition monosaturated_fat monounsaturated fat healthconstants nutrition trans_fat trans fat healthconstants nutrition carbohydrate carbohydrate healthconstants nutrition dietary_fiber dietary fiber healthconstants nutrition sugar sugar or glucose healthconstants nutrition protein protein healthconstants nutrition cholesterol cholesterol healthconstants nutrition sodium sodium healthconstants nutrition potassium potassium healthconstants nutrition vitamin_a vitamin a healthconstants nutrition vitamin_c vitamin c healthconstants nutrition calcium calcium healthconstants nutrition iron iron healthconstants nutrition 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 4 0 field summary fields modifier and type field and description static string calcium calcium amount in percent static string calorie calories in kilocalories static string carbohydrate carbohydrate amount in grams static string cholesterol cholesterol amount in milligrams static string dietary_fiber dietary fiber amount in grams static string health_data_type data type name for nutrition static string iron iron amount in percent static string meal_type meal type static int meal_type_afternoon_snack meal type for afternoon snack static int meal_type_breakfast meal type for breakfast static int meal_type_dinner meal type for dinner static int meal_type_evening_snack meal type for evening snack static int meal_type_lunch meal type for lunch static int meal_type_morning_snack meal type for morning snack static string monosaturated_fat monounsaturated fat amount in grams static string polysaturated_fat polyunsaturated fat amount in grams static string potassium potassium amount in milligrams static string protein protein amount in grams static string saturated_fat saturated fat amount in grams static string sodium sodium amount in milligrams static string sugar sugar or glucose amount in grams static string title nutrition intake title static string total_fat total fat amount in grams static string trans_fat trans fat amount in grams static string vitamin_a vitamin a amount in percent static string vitamin_c vitamin c amount in percent fields inherited from interface com samsung android sdk healthdata healthconstants discretemeasurement 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 meal_type static final string meal_type meal type mandatory type int available values one of the following values meal_type_breakfast meal_type_lunch meal_type_dinner meal_type_morning_snack meal_type_afternoon_snack meal_type_evening_snack since 1 4 0 see also constant field values meal_type_breakfast static final int meal_type_breakfast meal type for breakfast its constant value is 100001 since 1 4 0 see also meal_type, constant field values meal_type_lunch static final int meal_type_lunch meal type for lunch its constant value is 100002 since 1 4 0 see also meal_type, constant field values meal_type_dinner static final int meal_type_dinner meal type for dinner its constant value is 100003 since 1 4 0 see also meal_type, constant field values meal_type_morning_snack static final int meal_type_morning_snack meal type for morning snack its constant value is 100004 since 1 4 0 see also meal_type, constant field values meal_type_afternoon_snack static final int meal_type_afternoon_snack meal type for afternoon snack its constant value is 100005 since 1 4 0 see also meal_type, constant field values meal_type_evening_snack static final int meal_type_evening_snack meal type for evening snack its constant value is 100006 since 1 4 0 see also meal_type, constant field values calorie static final string calorie calories in kilocalories mandatory type float value range 0 ~ 99999 since 1 0 0 see also constant field values title static final string title nutrition intake title optional type string value length 0 ~ 255 since 1 4 0 see also constant field values total_fat static final string total_fat total fat amount in grams optional type float value range 0 ~ 9999 since 1 4 0 see also constant field values saturated_fat static final string saturated_fat saturated fat amount in grams optional type float value range 0 ~ 9999 since 1 4 0 see also constant field values polysaturated_fat static final string polysaturated_fat polyunsaturated fat amount in grams optional type float value range 0 ~ 9999 since 1 4 0 see also constant field values monosaturated_fat static final string monosaturated_fat monounsaturated fat amount in grams optional type float value range 0 ~ 9999 since 1 4 0 see also constant field values trans_fat static final string trans_fat trans fat amount in grams optional type float value range 0 ~ 9999 since 1 4 0 see also constant field values carbohydrate static final string carbohydrate carbohydrate amount in grams optional type float value range 0 ~ 9999 since 1 4 0 see also constant field values dietary_fiber static final string dietary_fiber dietary fiber amount in grams optional type float value range 0 ~ 9999 since 1 4 0 see also constant field values sugar static final string sugar sugar or glucose amount in grams optional type float value range 0 ~ 9999 since 1 4 0 see also constant field values protein static final string protein protein amount in grams optional type float value range 0 ~ 9999 since 1 4 0 see also constant field values cholesterol static final string cholesterol cholesterol amount in milligrams optional type float value range 0 ~ 10000 since 1 4 0 see also constant field values sodium static final string sodium sodium amount in milligrams optional type float value range 0 ~ 10000 since 1 4 0 see also constant field values potassium static final string potassium potassium amount in milligrams optional type float value range 0 ~ 10000 since 1 4 0 see also constant field values vitamin_a static final string vitamin_a vitamin a amount in percent optional type float value range 0 ~ 9999 since 1 4 0 see also constant field values vitamin_c static final string vitamin_c vitamin c amount in percent optional type float value range 0 ~ 9999 since 1 4 0 see also constant field values calcium static final string calcium calcium amount in percent optional type float value range 0 ~ 9999 since 1 4 0 see also constant field values iron static final string iron iron amount in percent optional type float value range 0 ~ 9999 since 1 4 0 see also constant field values health_data_type static final string health_data_type data type name for nutrition use "com samsung health nutrition" to add permission to the manifest file since 1 4 0 see also constant field values
We use cookies to improve your experience on our website and to show you relevant advertising. Manage you settings for our cookies below.
These cookies are essential as they enable you to move around the website. This category cannot be disabled.
These cookies collect information about how you use our website. for example which pages you visit most often. All information these cookies collect is used to improve how the website works.
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and tailor the website to provide enhanced features and content for you.
These cookies gather information about your browser habits. They remember that you've visited our website and share this information with other organizations such as advertisers.
You have successfully updated your cookie preferences.