This data type defines food intake data of the user.

Property Type Description
"datauuid" string [Mandatory]
Unique ID for each health data.
This value should be format of UUID, the 32 hexadecimal digits displayed in five groups separated by hyphens in the form 8-4-4-4-12. It is highly encouraged to generate it using random UUID generator.
  • Value length: 10 ~ 36

"create_time" long [Mandatory]
UTC milliseconds when a data is created in the health data store.
It is different with "start_time" that indicates the start time for measurement.
  • Value range: 0 and above

"update_time" long [Mandatory]
UTC milliseconds when a data is updated.
You don't need to set its value. When a new data is inserted, it is assigned as the same value with "create_time" by the system. Then it is replaced to the updated time by the system if existing health data is updated.
  • Value range: 0 and above

"pkg_name" string [Mandatory]
Package name which provides a data.
You don't need to set its value because it is assigned by the system when a new data is inserted.
  • Value length: 0 ~ 64

"deviceuuid" string [Mandatory]
Device identifier of the source device which provides a health data.
  • Value length: 10 ~ 36

"start_time" long [Mandatory]
UTC milliseconds when the measurement is started.
"time_off" needs to set for showing the data's measured time properly.
  • Value range: 0 and above

"time_offset" long [Mandatory]
Time offset in milliseconds which considers the time zone and daylight saving time.
E.g. Tehran (UTC+3:30) is presented as 12600000 (3.5 * 60 * 60 * 1000).
It affects to "start_time" to show the measured time properly to the user.
  • Value range: -43200000 (-12 * 60 * 60 * 1000) ~ 50400000 (14 * 60 * 60 * 1000)

"calorie" float [Mandatory]
Total calories of the meal in kilocalories.
  • Value range: 0 ~ 99999

"amount" float Count of food intake. If the user has two apples, "amount" is 2.
  • Value range: 0 ~ 99999

"food_info_id" string Deprecated. is deprecated.
Food information ID.
If you want to show nutritional information of food intake in Samsung Health, set this property with "datauuid" of "".
If there is no defined food info for food intake, define its food info and insert.
  • Value length: 10 ~ 32

"unit" string Unit used to describe the meal quantity.
  • Available values: one of the following values as text

Value Description
"120001" The default serving unit.
"120002" Gram.
"120003" Ounce.
"120004" Kilocalorie.
"-1" Kilocalorie.
"name" string Name given to the meal.
  • Value length: 0 ~ 255

"meal_type" int Meal type. If it is not set, your data is not shown on Samsung Health.
  • Available values: one of the following values

Value Description
100001 Meal type for breakfast.
100002 Meal type for lunch.
100003 Meal type for dinner.
100004 Meal type for morning snack.
100005 Meal type for afternoon snack.
100006 Meal type for evening snack.
"comment" string Comment for data.
  • Value length: 0 ~ 255

"custom" blob Custom info which is formatted with JSON and compressed data.