• Learn
    • Code Lab
    • Foldables and Large Screens
    • One UI Beta
    • Samsung Developers Podcasts
  • Develop
    • Mobile/Wearable
    • Galaxy GameDev
    • Galaxy Themes
    • Galaxy Watch
    • Health
    • Samsung Blockchain
    • Samsung DeX
    • Samsung IAP
    • Samsung Internet
    • Samsung Pay
    • Samsung Wallet
    • View All
      • Galaxy AR Emoji
      • Galaxy Accessory
      • Galaxy Edge
      • Galaxy Z
      • Galaxy Performance
      • Galaxy FM Radio
      • Galaxy S Pen Remote
      • Galaxy Sensor Extension
      • PENUP
      • Samsung Automation
      • Samsung Neural
      • Samsung TEEGRIS
      • Samsung eSE SDK
    • Visual Display
    • Smart TV
    • Smart Hospitality Display
    • Smart Signage
    • Digital Appliance
    • Family Hub
    • Platform
    • Bixby
    • Knox
    • SmartThings
    • Tizen.NET
  • Design
    • Design System
    • One UI
    • One UI Watch
    • Smart TV
  • Distribute
    • Galaxy Store
    • TV Seller Office
    • Galaxy Store Games
    • Samsung Podcasts
  • Support
    • Developer Support
    • Remote Test Lab
    • Issues and Bugs Channel
    • Samsung Android USB Driver
    • Galaxy Emulator Skin
  • Connect
    • Blog
    • News
    • Forums
    • Events
    • Samsung Developer Conference
    • SDC22
    • SDC21
    • SDC19 and Previous Events
  • Sign In
Top Global Search Form
Recommendation
  • Blog
  • Code Lab
  • Foldable and Large Screen Optimization
  • Forums
  • Galaxy Emulator Skin
  • Galaxy GameDev
  • Health
  • Remote Test Lab
  • Samsung Developer Conference
  • SDC22
  • Watch Face Studio
All Search Form
Recommendation
    Suggestion
      All Search Form
      Filter
      Filter
      Filter
      • ALL (100)
      • DOCS
      • SDK
      • API REFERENCE
      • CODE LAB
      • BLOG
      • NEWS/EVENTS
      • OTHERS
        api reference code lab blog news/events
      1. Develop
      2. Health

      api

      HealthConstants.BloodGlucose

      overview package class tree deprecated index com.samsung.android.sdk.healthdata interface healthconstants.bloodglucose all superinterfaces: healthconstants.common, healthconstants.discretemeasurement enclosing class: healthconstants public static interface healthconstants.bloodglucose extends healthconstants.discretemeasurement this interface defines blood glucose data of the user. properties properties of the following extending interfaces are available for this data type. healthconstants.common healthconstants.discretemeasurement blood glucose data has the following properties. see more common properties by spreading this section out. property name description healthconstants.bloodglucose.uuid [mandatory] data's unique id, assigned by the system when a new data is inserted healthconstants.bloodglucose.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.bloodglucose.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.bloodglucose.package_name [mandatory] package name which provides data, assigned by the system when a new data is inserted healthconstants.bloodglucose.device_uuid [mandatory] device identifier which provides the health data healthconstants.bloodglucose.start_time [mandatory] utc when the measurement is started healthconstants.bloodglucose.time_offset [mandatory] time offset in milliseconds which considers the time zone and daylight saving time healthconstants.bloodglucose.glucose [mandatory] measured blood glucose value healthconstants.bloodglucose.measurement_type [mandatory] type of the sample blood healthconstants.bloodglucose.meal_time utc at which meal is taken healthconstants.bloodglucose.meal_type context information for meal healthconstants.bloodglucose.sample_source_type source type of the blood vessel where the sample is taken healthconstants.bloodglucose.comment comment healthconstants.bloodglucose.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 comment comment for data. static string glucose measured blood glucose value in millimoles per liter. static string health_data_type data type name for blood glucose data. static string meal_time utc milliseconds at which meal is taken. static string meal_type context information for meal. static int meal_type_after_bedtime deprecated. use other meal types. static int meal_type_after_breakfast measurement taken after breakfast. static int meal_type_after_dinner measurement taken after dinner. static int meal_type_after_lunch measurement taken after lunch. static int meal_type_after_meal measurement taken after a meal. static int meal_type_after_snack measurement taken after a snack. static int meal_type_before_breakfast measurement taken before breakfast. static int meal_type_before_dinner measurement taken before dinner. static int meal_type_before_lunch measurement taken before lunch. static int meal_type_before_meal measurement taken before a meal. static int meal_type_before_sleep measurement taken before sleep. static int meal_type_fasting measurement taken during fasting. static int meal_type_general measurement in general. static string measurement_type type of the sample blood for the blood glucose measurement. static int measurement_type_not_defined undefined measurement type. static int measurement_type_plasma plasma measurement type. static int measurement_type_serum serum measurement type. static int measurement_type_whole_blood whole blood measurement type. static string sample_source_type source type of the blood vessel where the sample is taken. static int sample_source_type_capillary capillary sample source type. static int sample_source_type_not_defined sample source type is not defined. static int sample_source_type_venous source type for the venous blood. 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 glucose static final string glucose measured blood glucose value in millimoles per liter. mandatory type: float value range: 1 ~ 40 since: 1.0.0 see also: constant field values meal_time static final string meal_time utc milliseconds at which meal is taken. optional type: long value range: 0 and above since: 1.0.0 see also: constant field values meal_type static final string meal_type context information for meal. optional type: int available values: one of the following values meal_type_general meal_type_fasting meal_type_before_meal meal_type_after_meal meal_type_before_breakfast meal_type_after_breakfast meal_type_before_lunch meal_type_after_lunch meal_type_before_dinner meal_type_after_dinner meal_type_after_snack meal_type_before_sleep is the blood glucose data's meal type shown differently on samsung health? the meal type of inserted blood glucose data can be shown differently on samsung health because its ui policy can be changed when samsung health is updated. e.g. blood glucose data that is saved with meal_type_before_breakfast can be shown as pre-meal on samsung health and meal_type_after_snack can be shown as general. but it doesn't affect to data. its meal type is meal_type_before_breakfast as it is. since: 1.0.0 see also: constant field values meal_type_fasting static final int meal_type_fasting measurement taken during fasting. its constant value is 80001. refer to here for the blood glucose's meal type ui of samsung health. since: 1.0.0 see also: meal_type, constant field values meal_type_after_meal static final int meal_type_after_meal measurement taken after a meal. its constant value is 80002. refer to here for the blood glucose's meal type ui of samsung health. since: 1.0.0 see also: meal_type, constant field values meal_type_before_breakfast static final int meal_type_before_breakfast measurement taken before breakfast. its constant value is 80003. refer to here for the blood glucose's meal type ui of samsung health. since: 1.0.0 see also: meal_type, constant field values meal_type_after_breakfast static final int meal_type_after_breakfast measurement taken after breakfast. its constant value is 80004. refer to here for the blood glucose's meal type ui of samsung health. since: 1.0.0 see also: meal_type, constant field values meal_type_before_lunch static final int meal_type_before_lunch measurement taken before lunch. its constant value is 80005. refer to here for the blood glucose's meal type ui of samsung health. since: 1.0.0 see also: meal_type, constant field values meal_type_after_lunch static final int meal_type_after_lunch measurement taken after lunch. its constant value is 80006. refer to here for the blood glucose's meal type ui of samsung health. since: 1.0.0 see also: meal_type, constant field values meal_type_before_dinner static final int meal_type_before_dinner measurement taken before dinner. its constant value is 80007. refer to here for the blood glucose's meal type ui of samsung health. since: 1.0.0 see also: meal_type, constant field values meal_type_after_dinner static final int meal_type_after_dinner measurement taken after dinner. its constant value is 80008. refer to here for the blood glucose's meal type ui of samsung health. since: 1.0.0 see also: meal_type, constant field values meal_type_after_bedtime @deprecated static final int meal_type_after_bedtime deprecated. use other meal types. measurement taken after bedtime. its constant value is 80009. refer to here for the blood glucose's meal type ui of samsung health. since: 1.0.0 see also: meal_type, constant field values meal_type_after_snack static final int meal_type_after_snack measurement taken after a snack. its constant value is 80010. refer to here for the blood glucose's meal type ui of samsung health. since: 1.0.0 see also: meal_type, constant field values meal_type_before_meal static final int meal_type_before_meal measurement taken before a meal. its constant value is 80011. refer to here for the blood glucose's meal type ui of samsung health. since: 1.1.0 see also: meal_type, constant field values meal_type_general static final int meal_type_general measurement in general. its constant value is 80012. refer to here for the blood glucose's meal type ui of samsung health. since: 1.1.0 see also: meal_type, constant field values meal_type_before_sleep static final int meal_type_before_sleep measurement taken before sleep. its constant value is 80013. refer to here for the blood glucose's meal type ui of samsung health. since: 1.2.1 see also: meal_type, constant field values measurement_type static final string measurement_type type of the sample blood for the blood glucose measurement. mandatory type: int available values: one of the following values measurement_type_whole_blood measurement_type_plasma measurement_type_serum measurement_type_not_defined since: 1.0.0 see also: constant field values measurement_type_whole_blood static final int measurement_type_whole_blood whole blood measurement type. its constant value is 90001. since: 1.0.0 see also: measurement_type, constant field values measurement_type_plasma static final int measurement_type_plasma plasma measurement type. its constant value is 90002. since: 1.0.0 see also: measurement_type, constant field values measurement_type_serum static final int measurement_type_serum serum measurement type. its constant value is 90003. since: 1.0.0 see also: measurement_type, constant field values measurement_type_not_defined static final int measurement_type_not_defined undefined measurement type. its constant value is -1. since: 1.0.0 see also: measurement_type, constant field values sample_source_type static final string sample_source_type source type of the blood vessel where the sample is taken. optional type: int available values: one of the following values sample_source_type_venous sample_source_type_capillary sample_source_type_not_defined since: 1.0.0 see also: constant field values sample_source_type_venous static final int sample_source_type_venous source type for the venous blood. its constant value is 90001. since: 1.0.0 see also: sample_source_type, constant field values sample_source_type_capillary static final int sample_source_type_capillary capillary sample source type. its constant value is 90002. since: 1.0.0 see also: sample_source_type, constant field values sample_source_type_not_defined static final int sample_source_type_not_defined sample source type is not defined. its constant value is -1. since: 1.0.0 see also: sample_source_type, 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 blood glucose data. use "com.samsung.health.blood_glucose" to add permission to the manifest file. since: 1.0.0 see also: constant field values

      https://developer.samsung.com/health/android/data/api-reference/com/samsung/android/sdk/healthdata/HealthConstants.BloodGlucose.html
      1. Develop
      2. Health

      api

      HealthConstants

      overview package class tree deprecated index com.samsung.android.sdk.healthdata class healthconstants java.lang.object com.samsung.android.sdk.healthdata.healthconstants public final class healthconstants extends object this class contains interfaces data types in samsung health sdk for android such as steps or exercise. the sdk provides useful data types such as daily steps or the user's profile. data's common properties healthconstants.common identifies common properties of health data. its values are assigned by the system when a new health data is inserted. property description uuid health data's unique id create_time data creation time in the health data store update_time data's update time in the health data store package_name application package name that provides the health data device_uuid device identifier which provides the health data custom custom info the most data types extend one of the following interfaces according to the data's characteristics. discrete measurement healthconstants.discretemeasurement defines basic measurement information. start time of measurement time zone healthconstants.discretemeasurement and its extended data types are shown in the following class diagram. session measurement healthconstants.sessionmeasurement defines session measurement information with a start time and an end time. start time of measurement end time of measurement time zone healthconstants.sessionmeasurement and its extended data types are shown in the following class diagram. samsung health's data types the health data framework has the following useful predefined data types. activity healthconstants.stepdailytrend healthconstants.stepcount healthconstants.exercise healthconstants.floorsclimbed rest healthconstants.sleep healthconstants.sleepstage food healthconstants.nutrition healthconstants.waterintake healthconstants.caffeineintake health care healthconstants.bodytemperature healthconstants.bloodpressure healthconstants.bloodglucose healthconstants.heartrate healthconstants.oxygensaturation healthconstants.hba1c healthconstants.height healthconstants.weight healthconstants.albumin healthconstants.alp healthconstants.alt healthconstants.amylase healthconstants.ast healthconstants.bodyfat healthconstants.bodymuscle healthconstants.bun healthconstants.cpk healthconstants.creatinine healthconstants.directbilirubin healthconstants.fev1 healthconstants.fvc healthconstants.ggt healthconstants.globulin healthconstants.hdlc healthconstants.hipcircumference healthconstants.homocysteine healthconstants.ldh healthconstants.ldlc healthconstants.totalbilirubin healthconstants.totalcholesterol healthconstants.totalprotein healthconstants.triglyceride healthconstants.uph healthconstants.usg healthconstants.waistcircumference health document healthconstants.healthdocument environment info healthconstants.ambienttemperature healthconstants.uvexposure user profile healthuserprofile (read-only) samsung health's health data can be accessed after acquiring data permission through healthpermissionmanager. since: 1.0.0 nested class summary nested classes modifier and type class and description static interface healthconstants.albumin this interface defines albumin data of the user. static interface healthconstants.alp this interface defines alp (alkaline phosphatase) data of the user. static interface healthconstants.alt this interface defines alt(alanine aminotransferase) data of the user. static interface healthconstants.ambienttemperature this interface defines ambient temperature and humidity data around the device. static interface healthconstants.amylase this interface defines amylase data of the user. static interface healthconstants.ast this interface defines ast (aspartate aminotransferase) data of the user. static interface healthconstants.bloodglucose this interface defines blood glucose data of the user. static interface healthconstants.bloodpressure this interface defines blood pressure data of the user. static interface healthconstants.bodyfat this interface defines body fat data of the user. static interface healthconstants.bodymuscle this interface defines body muscle data of the user. static interface healthconstants.bodytemperature this interface defines body temperature data of the user. static interface healthconstants.bun this interface defines bun (blood urea nitrogen) data of the user. static interface healthconstants.caffeineintake this interface defines caffeine intake data of the user. static interface healthconstants.common this interface contains the common constants for health data such as the data's unique id, the application package name which provides data, and the data's source device information. static interface healthconstants.cpk this interface defines cpk (creatine phosphokinase) data of the user. static interface healthconstants.creatinine this interface defines creatinine data of the user. static interface healthconstants.directbilirubin this interface defines direct bilirubin data of the user. static interface healthconstants.discretemeasurement this interface contains basic constants for measurement such as the start or offset time. static interface healthconstants.electrocardiogram deprecated. 1.5.0 this data type will be removed. do not use it any more. static interface healthconstants.exercise this interface defines exercise data of the user. static interface healthconstants.fev1 this interface defines fev1 (forced expiratory volume in one second) data of the user. static interface healthconstants.floorsclimbed this interface defines floors climbed data of the user. static interface healthconstants.foodinfo deprecated. use healthconstants.nutrition instead of it. this data type will be removed. do not use it any more. static interface healthconstants.foodintake deprecated. use healthconstants.nutrition instead of it. this data type will be removed. do not use it any more. static interface healthconstants.fvc this interface defines fvc (forced vital capacity) data of the user. static interface healthconstants.ggt this interface defines ggt (gamma glutamyl transpeptidase) data of the user. static interface healthconstants.globulin this interface defines globulin data of the user. static interface healthconstants.hba1c this interface defines glycated hemoglobin data of the user. static interface healthconstants.hdlc this interface defines hdl-c(high-density lipoprotein cholesterol) data of the user. static interface healthconstants.healthdocument this interface defines health docuemnt data of the user. static interface healthconstants.heartrate this interface defines heart rate data of the user. static interface healthconstants.height this interface defines height data of the user. static interface healthconstants.hipcircumference this interface defines hip circumference data of the user. static interface healthconstants.homocysteine this interface defines homocysteine data of the user. static interface healthconstants.ldh this interface defines ldh (lactate dehydrogenase) data of the user. static interface healthconstants.ldlc this interface defines ldl-c (low-density lipoprotein cholesterol) data of the user. static interface healthconstants.nutrition this interface defines nutrition user intakes. static interface healthconstants.oxygensaturation this interface defines oxygen saturation data in the user's blood. static interface healthconstants.sessionmeasurement this interface contains measurement constants that has a session with the end time. static interface healthconstants.sleep this interface defines sleep data of the user. static interface healthconstants.sleepstage this interface defines the detailed sleep stage for the specified sleep data. static interface healthconstants.stepcount this interface defines the user's step count data. static interface healthconstants.stepdailytrend this interface defines the user's daily step count trend data. static interface healthconstants.totalbilirubin this interface defines total bilirubin data of the user. static interface healthconstants.totalcholesterol this interface defines total cholesterol data of the user. static interface healthconstants.totalprotein this interface defines total protein data of the user. static interface healthconstants.triglyceride this interface defines triglyceride data of the user. static interface healthconstants.uph this interface defines uph (urine ph) data of the user. static interface healthconstants.usg this interface defines usg (urine specific gravity) data of the user. static interface healthconstants.uvexposure this interface defines uv exposure data around the device. static interface healthconstants.waistcircumference this interface defines waist circumference data of the user. static interface healthconstants.waterintake this interface defines water intake data of the user. static interface healthconstants.weight this interface defines weight data of the user. field summary fields modifier and type field and description static string user_profile_data_type data type name for the user profile. constructor summary constructors constructor and description healthconstants() field detail user_profile_data_type public static final string user_profile_data_type data type name for the user profile. use "com.samsung.health.user_profile" to add permission to the manifest file. the user profile is available to read only and can be retrieved with healthuserprofile. see also: constant field values constructor detail healthconstants public healthconstants()

      https://developer.samsung.com/health/android/data/api-reference/com/samsung/android/sdk/healthdata/HealthConstants.html
      1. Develop
      2. Health

      api

      HealthDataResolver.InsertRequest.Builder

      overview package class tree deprecated index com.samsung.android.sdk.healthdata class healthdataresolver.insertrequest.builder java.lang.object com.samsung.android.sdk.healthdata.healthdataresolver.insertrequest.builder enclosing interface: healthdataresolver.insertrequest public static class healthdataresolver.insertrequest.builder extends object this class is a builder to configure healthdataresolver.insertrequest. public class healthdataresolverexample { private healthdataresolver.insertrequest buildinsertrequest() { healthdataresolver.insertrequest request = new healthdataresolver.insertrequest.builder() .setdatatype(healthconstants.bloodglucose.health_data_type) .build(); return request; } } since: 1.0.0 constructor summary constructors constructor and description builder() helps to construct a healthdataresolver.insertrequest object. method summary all methods instance methods concrete methods modifier and type method and description healthdataresolver.insertrequest build() builds a new healthdataresolver.insertrequest object. healthdataresolver.insertrequest.builder setdatatype(string type) sets a health data type to insert health data. constructor detail builder public builder() helps to construct a healthdataresolver.insertrequest object. since: 1.0.0 method detail setdatatype public healthdataresolver.insertrequest.builder setdatatype(string type) sets a health data type to insert health data. it has to be specified before calling build(). parameters: type - health_data_type of the data type returns: the object that applies the health data type since: 1.0.0 build public healthdataresolver.insertrequest build() builds a new healthdataresolver.insertrequest object. check if the data type is defined with setdatatype(string). returns: the healthdataresolver.insertrequest object throws: illegalstateexception - if no data type is specified since: 1.0.0 see also: setdatatype(string)

      https://developer.samsung.com/health/android/data/api-reference/com/samsung/android/sdk/healthdata/HealthDataResolver.InsertRequest.Builder.html
      1. Develop
      2. Health

      api

      HealthDataResolver.ReadResult

      overview package class tree deprecated index com.samsung.android.sdk.healthdata class healthdataresolver.readresult java.lang.object com.samsung.android.sdk.healthdata.healthresultholder.baseresult com.samsung.android.sdk.healthdata.healthdataresolver.readresult all implemented interfaces: parcelable, closeable, autocloseable, iterable<healthdata> enclosing class: healthdataresolver public static class healthdataresolver.readresult extends healthresultholder.baseresult implements iterable<healthdata>, closeable this class represents the result for healthdataresolver.readrequest. it is retrieved with asynchronous request or synchronous request. each health data in the result can be checked with iterator() and close(). since: 1.0.0 field summary fields inherited from class com.samsung.android.sdk.healthdata.healthresultholder.baseresult status_canceled, status_failed, status_invalid_input_data, status_out_of_space, status_successful, status_unknown method summary all methods instance methods concrete methods modifier and type method and description void close() closes this result, releasing all of its resources and making it completely invalid. string getdatatype() gets a data type for the requested health data. cursor getresultcursor() gets a cursor object for the requested health data. iterator<healthdata> iterator() returns an iterator over the healthdata objects in this result in proper sequence. methods inherited from class com.samsung.android.sdk.healthdata.healthresultholder.baseresult getcount, getstatus method detail getresultcursor public cursor getresultcursor() gets a cursor object for the requested health data. check health data of the result as moving it to the next. returns: the cursor object, or null if the request doesn't work caused by an unknown error. since: 1.0.0 getdatatype public string getdatatype() gets a data type for the requested health data. returns: the data type since: 1.0.0 iterator public iterator<healthdata> iterator() returns an iterator over the healthdata objects in this result in proper sequence. returns: an iterator of this result. since: 1.3.0 close public void close() closes this result, releasing all of its resources and making it completely invalid. calling this method, the result will not be valid any more. since: 1.3.0

      https://developer.samsung.com/health/android/data/api-reference/com/samsung/android/sdk/healthdata/HealthDataResolver.ReadResult.html
      1. Develop
      2. Galaxy Watch for Tizen

      doc

      Provided Complications

      provided complications the following are sample complications provided with galaxy watch studio. time image name description date_digital_a a digital clock that displays the day of the month on a black square background and consists of a digital clock component and image. date_digital_b a digital clock that displays the day of the month on a circular background and consists of a digital clock component and image. dayofweek_analog a watch hand that designates the day of the week and consists of a watch hand component and image. dayofweek_digital a digital clock that designates the day of the week and consists of a digital clock component and image. month_analog_a a watch hand that designates the numerical month of the year and consists of a watch hand component and image. month_analog_b a watch hand that designates the numerical month of the year and consists of a watch hand component and image. second_analog_a a watch hand that designates seconds and consists of a watch hand component and image. second_analog_b a watch hand that designates seconds and consists of a watch hand component and image. second_analog_c a watch hand that designates seconds and consists of a watch hand component and image. second_analog_d a watch hand that designates seconds and consists of a watch hand component and image. second_analog_e a watch hand that designates seconds and consists of a watch hand component and image. battery image name description analog_01 images that show battery status. tap to open the battery status app.there are 54 images that make up this complication: the gauge (images 1 and 4 - 53), the battery icon (images 2 and 3), and the area that can be tapped to open the battery status app (image 54).the gauge visually represents the battery percentage. the higher the battery percentage, the more marks are filled in the gauge. if the battery percentage is below 20%, the filled-in marks are orange. if the battery percentage is greater than or equal to 20%, the filled-in marks are green.the battery icon displays one of two images. if the battery percentage is below 20%, a warning battery image is displayed. if the battery percentage is greater than or equal to 20%, a normal battery is displayed.the images that are displayed are determined by conditional lines based on the battery percentage. for example, the low battery image (image 3) is activated when the battery percentage is less than 20%. analog_02 images and watch hands that show battery status. tap to open the battery status app.there are four images and two watch hands that make up this complication. image 1 is the gauge, images 2 and 3 are the battery icon, and image 4 is the area that can be tapped to open the battery status app. the watch hands are synced with the battery percentage.the battery icon displays one of two images. if the battery percentage is below 20%, a warning battery image is displayed. if the battery percentage is greater than or equal to 20%, a normal battery is displayed. the battery image that is displayed is determined by conditional lines based on the battery percentage. for example, the low battery image (image 3) is activated when the battery percentage is less than 20%. digital images and text that show battery status. tap to open the battery status app.there are 24 images and a text component that make up this complication. images 1 - 21 are the gauge, images 22 and 23 are battery icon, and image 24 is the area that can be tapped to open the battery status app. the text component is synced with the battery percentage.the gauge visually represents the battery percentage. the higher the battery percentage, the more marks are filled in the gauge.the battery icon displays one of two images. if the battery percentage is below 15%, an empty battery image is displayed. if the battery percentage is greater than or equal to 15%, a filled-in battery image is displayed.the images that are displayed are determined by conditional lines based on the battery percentage. for example, the low battery image (image 22) is activated when the battery percentage is less than or equal to 15%. workout image name description speed_analog watch hand and images that show walking speed. tap to open s health app (steps speed). speed_digital text and image that show walking speed. tap to open s health app (steps speed). steps_analog_a images and watch hands that show step percentage. tap to open the s health app (steps).there are three images and two watch hands that make up this complication. image 1 is the gauge and the area that can be tapped to open the s health app and images 2 and 3 are the shoe icon. the watch hands are synced with the step percentage.the shoe icon displays one of two images. if the steps percentage is below 80%, an empty shoe image is displayed. if the steps percentage is greater than or equal to 80%, a filled in shoe in a circle is displayed. the shoe image that is displayed is determined by conditional lines based on the steps percentage. for example, the empty shoe image (image 2) is activated when the steps percentage is less than 80%. steps_analog_b images and watch hands that show step percentage. tap to open the s health app (steps).there are three images and two watch hands that make up this complication. image 1 is the gauge and the area that can be tapped to open the s health app and images 2 and 3 are the shoe icon. the watch hands are synced with the step percentage.the shoe icon displays one of two images. if the steps percentage is below 80%, an empty shoe image is displayed. if the steps percentage is greater than or equal to 80%, a filled in shoe in a circle is displayed. the shoe image that is displayed is determined by conditional lines based on the steps percentage. for example, the empty shoe image (image 2) is activated when the steps percentage is less than 80%. steps_digital_a text and image that show number of steps. tap to open s health app (steps). steps_digital_b text and images that show the number of steps taken, steps goal, and steps percentage. the images change, depending on the percentage of steps taken towards the goal.there are three images that may be displayed. the first image is a man standing still that is displayed when the step percentage is 0. the second image is a running man that is displayed when the step percentage is less than or equal to 99. its position is also adjusted horizontally to the right as the step percentage increases. the third image is a man with raised arms that is displayed when the step percentage is equal to 100.each image uses a tag expression that defines its opacity to determine if it is displayed. additionally, the running man image uses a tag expression that defines its location on the watch face. water image name description water_a text and image that show amount of water consumed. tap to open s health app (water). water_b text and image that show amount of water consumed. tap to open s health app (water). water_c text and image that show amount of water consumed. tap to open s health app (water). caffeine image name description caffein_a text and image that show amount of caffeine consumed. tap to open s health app (caffeine). caffein_b text and image that show amount of caffeine consumed. tap to open s health app (caffeine). caffein_c text and image that show amount of caffeine consumed. tap to open s health app (caffeine). heart rate image name description heart_01 text and image that show heart rate. tap the icon to open s health app (measuring heart rate). heart_02 text and image that show heart rate. tap the icon to open s health app (measuring heart rate). heart_03 text that shows the heart rate and an animated image that changes, depending on the heart rate.there are three images that may be displayed. the first image is white and pulses slowly if the heart rate is less than or equal to 50. the second image is gold and pulses at a medium speed if the heart rate is greater than 50 or less than or equal to 100. the third image is red and pulses quickly if the heart rate is greater than 100.each image uses a tag expression that defines its location on the watch face. effect image name description autoban background image of cars on the road that responds to the watch's tilt position and angle. cube background image of a cube that responds to the watch's tilt position and angle. gyro_effect_sample_dance background image of dancers that responds to the watch's tilt position and angle. leveler background image of concentric circles that responds to the watch's tilt position and angle. light_effect background image of reflection that responds to the watch's tilt position and angle. wave background image of a ripple that responds to the watch's tilt position and angle.

      https://developer.samsung.com/galaxy-watch-tizen/studio/tutorial/provided-complications.html
      1. Develop
      2. Health

      api

      HealthPermissionManager

      overview package class tree deprecated index com.samsung.android.sdk.healthdata class healthpermissionmanager java.lang.object com.samsung.android.sdk.healthdata.healthpermissionmanager public class healthpermissionmanager extends object this class requests permission to read or write health data for the specific health data type. note, healthconstants.healthdocument can be accessed with the instant permission. see acquring instant data permission. requesting permission an application can access health data only if the user consents. permission for data access can be requested by each data type and the permission type (read or write). public class mainactivity extends activity { // the state of connection private healthdatastore mstore; set<permissionkey> mkeys = new hashset<permissionkey>(); private static final string app_tag = "myapp"; public void requestpermission() { // acquire permission healthpermissionmanager pmsmanager = new healthpermissionmanager(mstore); mkeys.add(new permissionkey(exercise.health_data_type, permissiontype.read)); mkeys.add(new permissionkey(exercise.health_data_type, permissiontype.write)); mkeys.add(new permissionkey(stepdailytrend.health_data_type, permissiontype.read)); try { pmsmanager.requestpermissions(mkeys, mainactivity.this).setresultlistener(mpermissionlistener); } catch (exception e) { log.d(app_tag, "requestpermissions() fails"); } } if requestpermissions() succeeds, the permission ui is popped up on the device. the user can check and allow each data type's permission with scrolling down. if the user allows permission items on the permission ui and select "done", its result is sent to permissionresult and you can check whether the user allows the data access or not. private final healthresultholder.resultlistener<permissionresult> mpermissionlistener = new healthresultholder.resultlistener<permissionresult>() { @override public void onresult(permissionresult result) { map<permissionkey, boolean> resultmap = result.getresultmap(); if (resultmap.values().contains(boolean.false)) { log.d(app_tag, "all required permissions are not granted."); } else { log.d(app_tag, "all required permissions are granted."); //access health data } } }; } specifying permission in manifest not only calling permission related apis, but specifying permission in the manifest file is required. the declared permission items in the application's manifest are shown on "samsung health > settings > data permissions > [yourapp]". manifest below contains two data permissions to read and one data permission to write health data. use the semicolon (;) to declare multiple data types. <manifest . . . > <application . . . > <meta-data android:name="com.samsung.android.health.permission.read" android:value="com.samsung.health.exercise;com.samsung.shealth.step_daily_trend"/> <meta-data android:name="com.samsung.android.health.permission.write" android:value="com.samsung.health.exercise"/> </application> </manifest> the constant value of the required data type can be checked as shown below. find its health_data_type in api reference. e.g. if the data type is healthconstants.exercise, you'll meet the following description. use the constant value, "com.samsung.health.exercise", for a permission declaration in your app's manifest file. guidelines for permission request acquiring permission from the user is essential to access health data but too frequent requests of permission can annoy the user. here are guidelines that help you to find a solution for the permission request. permission needs to be requested in the following cases. when your application connects to samsung health at the first time if there is a menu that connects to samsung health in your application and the user selects it and avoid requesting permission in the following cases. when your application goes on the background frequent requests of permission until the user grants (an occasional nudge is fine) see the privacy section of programming guide for more information. since: 1.0.0 nested class summary nested classes modifier and type class and description static class healthpermissionmanager.permissionkey this class represents the permission key which consists of a health data type and a permission type. static class healthpermissionmanager.permissionresult this class represents the result of requestpermissions(set, activity). static class healthpermissionmanager.permissiontype this enum defines the permission type to read or write health data. constructor summary constructors constructor and description healthpermissionmanager(healthdatastore store) constructs and initializes an instance of healthpermissionmanager. method summary all methods instance methods concrete methods deprecated methods modifier and type method and description map<healthpermissionmanager.permissionkey,boolean> ispermissionacquired(set<healthpermissionmanager.permissionkey> permissionkeys) checks whether the specified permissions are acquired. healthresultholder<healthpermissionmanager.permissionresult> requestpermissions(set<healthpermissionmanager.permissionkey> permissionkeys) deprecated. use requestpermissions(set, activity) instead of it. healthresultholder<healthpermissionmanager.permissionresult> requestpermissions(set<healthpermissionmanager.permissionkey> permissionkeys, activity activity) requests permissions through the permission ui on the given activity. constructor detail healthpermissionmanager public healthpermissionmanager(healthdatastore store) constructs and initializes an instance of healthpermissionmanager. parameters: store - the successful connection to the health data store. since: 1.0.0 method detail requestpermissions public healthresultholder<healthpermissionmanager.permissionresult> requestpermissions(set<healthpermissionmanager.permissionkey> permissionkeys) deprecated. use requestpermissions(set, activity) instead of it. requests permissions through the permission ui. if it is called, the permission ui is shown to the user. avoid calling this method frequently. refer to its guidelines. parameters: permissionkeys - the set of required permission keys returns: the permission result that resolves to the requested permission keys throws: illegalargumentexception - if the permissionkeys is invalid illegalstateexception - if the connection to the health data store is invalid or a remote-invocation error occurs on the connection since: 1.0.0 requestpermissions public healthresultholder<healthpermissionmanager.permissionresult> requestpermissions(set<healthpermissionmanager.permissionkey> permissionkeys, activity activity) requests permissions through the permission ui on the given activity. if it is called, the permission ui is shown to the user. avoid calling this method frequently. refer to its guidelines. parameters: permissionkeys - the set of required permission keys activity - the activity that pop up the permission ui. returns: the permission result that resolves to the requested permission keys throws: illegalargumentexception - if the permissionkeys is invalid illegalstateexception - if the connection to the health data store is invalid or a remote-invocation error occurs on the connection since: 1.2.0 ispermissionacquired public map<healthpermissionmanager.permissionkey,boolean> ispermissionacquired(set<healthpermissionmanager.permissionkey> permissionkeys) checks whether the specified permissions are acquired. parameters: permissionkeys - the set of permission keys to check acquisition returns: the result map representing whether the specified permissions are acquired. the permission state for the specific permission key can be retrieved by map.get(object) as the following example. public class healthpermissionmanagerexample { // the state of connection private healthdatastore mstore; private static final string app_tag = "myapp"; private void checkpermissions() { healthpermissionmanager pmsmanager = new healthpermissionmanager(mstore); set<healthpermissionmanager.permissionkey> keys = new hashset<healthpermissionmanager.permissionkey>(); healthpermissionmanager.permissionkey key1 = new healthpermissionmanager.permissionkey( healthconstants.bloodglucose.health_data_type, healthpermissionmanager.permissiontype.read); keys.add(key1); healthpermissionmanager.permissionkey key2 = new healthpermissionmanager.permissionkey( healthconstants.bloodpressure.health_data_type, healthpermissionmanager.permissiontype.read); keys.add(key2); try { map resultmap = pmsmanager.ispermissionacquired(keys); if(resultmap.get(key1) == boolean.true) { log.d(app_tag, "you can read the blood glucose data type."); } else { log.d(app_tag, "there is no permission to read the blood glucose data type."); } if(resultmap.get(key2) == boolean.true) { log.d(app_tag, "you can read the blood pressure data type."); } else { log.d(app_tag, "there is no permission to read the blood pressure data type."); } } catch (exception e) { log.d(app_tag, "check the connection."); } } } throws: illegalargumentexception - if the permissionkeys is invalid illegalstateexception - if the connection to the health data store is invalid or a remote-invocation error occurs on the connection since: 1.0.0

      https://developer.samsung.com/health/android/data/api-reference/com/samsung/android/sdk/healthdata/HealthPermissionManager.html
      1. Develop
      2. Health

      api

      HealthDataResolver.DeleteRequest

      overview package class tree deprecated index com.samsung.android.sdk.healthdata interface healthdataresolver.deleterequest enclosing class: healthdataresolver public static interface healthdataresolver.deleterequest this interface is able to make a request to delete health data for the specific health data type. only inserted health data by your application can be deleted. request for deleting data healthdataresolver.delete() helps deletes your application's data in samsung health. the following information is mandatory to build an deleterequest instance. mandatory information description data type set the data type with: deleterequest.builder.setdatatype() you can make a request instance with deleterequest.builder.build(). since: 1.0.0 nested class summary nested classes modifier and type interface and description static class healthdataresolver.deleterequest.builder this class is a builder to configure healthdataresolver.deleterequest.

      https://developer.samsung.com/health/android/data/api-reference/com/samsung/android/sdk/healthdata/HealthDataResolver.DeleteRequest.html
      1. Develop
      2. Health

      api

      HealthUserProfile

      overview package class tree deprecated index com.samsung.android.sdk.healthdata class healthuserprofile java.lang.object com.samsung.android.sdk.healthdata.healthuserprofile public class healthuserprofile extends object this class provides a user profile. it handles the user's following information: date of birth gender height weight nickname getting user profile samsung health's user profile is read-only and you can get it after acquiring the user's permission. set the user profile data type's permission info in the manifest. <manifest . . . > <application . . . > <meta-data android:name="com.samsung.android.health.permission.read" android:value="com.samsung.health.user_profile"/> </application . . . > </manifest . . . > getting the user profile is same with other data type access. returning an empty string, 0.0, or unknown value can be retrieved for each property means that the user doesn't fill out samsung health's profile. public class mainactivity extends activity { // the state of connection private healthdatastore mstore; // permission key set set<healthpermissionmanager.permissionkey> mkeyset = new hashset<healthpermissionmanager.permissionkey>(); public static final string app_tag = "myapp"; private void getuserprofile() { // adds a permission to read a user profile to the permission key set mkeyset.add(new healthpermissionmanager.permissionkey(healthconstants.user_profile_data_type, healthpermissionmanager.permissiontype.read)); healthpermissionmanager pmsmanager = new healthpermissionmanager(mstore); try { // checks if a user profile permission is acquired map<healthpermissionmanager.permissionkey, boolean> keymap = pmsmanager.ispermissionacquired(mkeyset); // request permission if the user profile permission is not acquired if(keymap.containsvalue(boolean.false)) { pmsmanager.requestpermissions(mkeyset, mainactivity.this).setresultlistener(mpermissionlistener); } } catch(exception e) { log.d(app_tag, "requestpermissions() fails."); } } private final healthresultholder.resultlistener<healthpermissionmanager.permissionresult> mpermissionlistener = new healthresultholder.resultlistener<healthpermissionmanager.permissionresult>() { @override public void onresult(healthpermissionmanager.permissionresult permissionresult) { map<healthpermissionmanager.permissionkey, boolean> resultmap = permissionresult.getresultmap(); if (resultmap.containsvalue(boolean.true)) { // gets the user profile if permission is acquired try { healthuserprofile usrprofile = healthuserprofile.getprofile(mstore); // date of birth - yyyymmdd string birthdate = usrprofile.getbirthdate(); if (birthdate.isempty()) { log.d(app_tag, "date of birth is not set by the user yet."); } // gender int gender = usrprofile.getgender(); if (gender == healthuserprofile.gender_unknown) { log.d(app_tag, "gender is not set by the user yet."); } // height float height = usrprofile.getheight(); if (height == 0.0f) { log.d(app_tag, "height is not set by the user yet."); } // weight float weight = usrprofile.getweight(); if (weight == 0.0f) { log.d(app_tag, "weight is not set by the user yet."); } } else { log.d(tag, "fail to get permission."); } } }; } since: 1.0.0 field summary fields modifier and type field and description static int gender_female female as the value of gender. static int gender_male male as the value of gender. static int gender_unknown unknown as the value of gender. method summary all methods static methods instance methods concrete methods deprecated methods modifier and type method and description string getbirthdate() gets the user's date of birth. int getgender() gets the gender of the user. float getheight() gets the latest height of the user. bitmap getimage() deprecated. it will removed. do not use any more. static healthuserprofile getprofile(healthdatastore store) gets a healthuserprofile instance. string getuserid() deprecated. it will removed. do not use any more. string getusername() gets the nickname that the user entered in samsung health. float getweight() gets the latest weight of the the user. field detail gender_unknown public static final int gender_unknown unknown as the value of gender. its constant value is 0. see also: constant field values gender_male public static final int gender_male male as the value of gender. its constant value is 1. see also: constant field values gender_female public static final int gender_female female as the value of gender. its constant value is 2. see also: constant field values method detail getprofile public static healthuserprofile getprofile(healthdatastore store) gets a healthuserprofile instance. it works after acquiring permission for healthconstants.user_profile_data_type. parameters: store - the connection to the health data store returns: the healthuserprofile instance throws: illegalargumentexception - if the specified input is invalid illegalstateexception - if the connection to the health data store is invalid or a remote-invocation error occurs on the connection securityexception - if permission for healthconstants.user_profile_data_type is not acquired since: 1.0.0 getbirthdate public string getbirthdate() gets the user's date of birth. returns: the user's date of birth with the yyyymmdd format. if it returns the empty string, it means the user doesn't set the birth date on the profile page of samsung health. since: 1.0.0 getheight public float getheight() gets the latest height of the user. the unit is centimeter. returns: the height of the user. if it returns 0.0, it means the user doesn't set the height on the profile page of samsung health. since: 1.0.0 getweight public float getweight() gets the latest weight of the the user. the unit is kilogram. returns: the weight of the user. if it returns 0.0, it means the user doesn't set the weight on the profile page of samsung health. since: 1.0.0 getuserid @deprecated public string getuserid() deprecated. it will removed. do not use any more. gets an empty string. returns: empty string since: 1.0.0 getgender public int getgender() gets the gender of the user. returns: the gender of the user. one of the following values is returned. gender_unknown, if the user doesn't set the gender info on the profile page of samsung health gender_male gender_female since: 1.0.0 getusername public string getusername() gets the nickname that the user entered in samsung health. returns: the user's nickname. it returns the empty string. since: 1.2.0 getimage @deprecated public bitmap getimage() deprecated. it will removed. do not use any more. gets null. returns: null. since: 1.2.0

      https://developer.samsung.com/health/android/data/api-reference/com/samsung/android/sdk/healthdata/HealthUserProfile.html
      1. Develop
      2. Health

      api

      HealthDataResolver.ReadRequest

      overview package class tree deprecated index com.samsung.android.sdk.healthdata interface healthdataresolver.readrequest enclosing class: healthdataresolver public static interface healthdataresolver.readrequest this interface is able to make a request to read health data for the specific health data type. request for reading data healthdataresolver.read() helps that your application reads samsung health's data. the following information is mandatory to build a readrequest instance. mandatory information description data type set the data type with: readrequest.builder.setdatatype() you can make a request instance with readrequest.builder.build(). reading data example you can read samsung health's health data with healthdataresolver.read(). the filter below is created to read today's step count. the time range is set from the starttime to endtime. // the state of connection private final healthdatastore mstore; public static final string app_tag = "myapp"; private static final long one_day_in_millis = 24 * 60 * 60 * 1000l; private long getstarttimeoftoday() { calendar today = calendar.getinstance(timezone.gettimezone("utc")); today.set(calendar.hour_of_day, 0); today.set(calendar.minute, 0); today.set(calendar.second, 0); today.set(calendar.millisecond, 0); return today.gettimeinmillis(); } an readrequest instance is created by readrequest.builder.build() with setting the data type and the range for reading data. private void readtodaystepcount() { // set time range from start time of today to the current time long starttime = getstarttimeoftoday(); long endtime = starttime + one_day_in_millis; healthdataresolver.readrequest request = new readrequest.builder() .setdatatype(healthconstants.stepcount.health_data_type) .setproperties(new string[] {healthconstants.stepcount.count}) .setlocaltimerange(healthconstants.stepcount.start_time, healthconstants.stepcount.time_offset, starttime, endtime) .build(); readrequest.read() sends a reading request to samsung health. the asynchronous request is used generally by setting a listener. healthdataresolver resolver = new healthdataresolver(mstore, null); try { resolver.read(request).setresultlistener(mlistener); } catch (exception e) { log.d(myapp, "getting step count fails."); } } the result is sent to the implemented listener. the today's total count is returned by adding all count values of the result. private final healthresultholder.resultlistener<readresult> mlistener = new healthresultholder.resultlistener<readresult>() { @override public void onresult(readresult result) { int count = 0; try { iterator<healthdata> iterator = result.iterator(); if (iterator.hasnext()) { healthdata data = iterator.next(); count += data.getint(healthconstants.stepcount.count); } } finally { result.close(); } } }; since: 1.0.0 nested class summary nested classes modifier and type interface and description static class healthdataresolver.readrequest.builder this class is a builder to configure healthdataresolver.readrequest.

      https://developer.samsung.com/health/android/data/api-reference/com/samsung/android/sdk/healthdata/HealthDataResolver.ReadRequest.html
      1. Learn
      2. Code Lab

      codelab

      Create a Daily Step Counter on Galaxy Watch

      create a daily step counter on galaxy watch objective create a native app for galaxy watch, operating on wear os powered by samsung, using health platform to read your daily steps. overview health platform provides a unified and straightforward way for accessing a wide range of health and wellness related data. with health platform api, you may easily read and write data stored in health platform on android and wear os powered by samsung. applications can have access to these secured data only with explicit user consent. additionally, users may disable access to the data at any point in time. see health platform descriptions for detailed information. set up your environment you will need the following: galaxy watch4 or newer android studio (latest version recommended) java se development kit (jdk) 11 or later sample code here is a sample code for you to start coding in this code lab. download it and start your learning experience! health step count sample code (119.87 kb) turn on developer mode and adjust its settings on your watch, go to settings > about watch > software and tap on software version 5 times. upon successful activation of developer mode, a toast message will display as on the image below. afterwards, developer options will be visible under settings. tap developer options and enable the following options: adb debugging debug over wi-fi turn off automatic wi-fi connect your galaxy watch to wi-fi go to settings > connection > wi-fi and make sure that wi-fi is enabled. from the list of available wi-fi networks, choose and connect to the same one as your pc. when successfully connected, tap a wi-fi network name, swipe down, and note the ip address. you will need this to connect your watch over adb from your pc. connect your galaxy watch to android studio in android studio, go to terminal and type: adb connect <ip address as mentioned in previous step> when prompted, tap always allow from this computer to allow debugging. upon successful connection, you will see the following message in android studio’s terminal: connected to <ip address of your watch> now, you can run the app directly on your watch. start your project after downloading the sample code containing the project files, in android studio click open to open existing project. locate the downloaded android project (stepcount) from the directory and click ok. check dependency and app manifest in the dependencies section of stepcount/app/build.gradle file, see the appropriate dependency for health platform. dependencies { implementation com.google.android.libraries.healthdata:health-data-api:1.0.0-alpha01' // ... } notelibrary might update from time to time. if necessary, choose the version suggested by android studio. request for data permissions before accessing any data through health platform, the client app must obtain necessary permissions from the user. in permissions.java, create a permission instance to trigger relevant permission screen and obtain required consent from end user. data type name: intervaldatatypes.steps read access: accesstype.read /******************************************************************************************* * [practice 1] build permission object grand permissions for read today's steps * - set interval data type of steps * - set read access type ------------------------------------------------------------------------------------------- * - (hint) uncomment lines below and fill todos with * (1) for interval data type: intervaldatatypes.steps * (2) for read access: accesstype.read ******************************************************************************************/ permission stepsreadpermission = permission.builder() //.setdatatype("todo 1 (1)") //.setaccesstype("todo 1 (2)") .build(); make a query to aggregate today’s steps create read request with all necessary information to read data through health platform api. the answer from the platform will be asynchronous with the result from which you can get all the data you are interested in. follow the steps below to get today's steps count: in stepsreader.java, create a readaggregateddatarequest with cumulativeaggregationspec instance: data type name: intervaldatatypes.steps /******************************************************************************************* * [practice 2] build read aggregated data request object for read today's steps * - set interval data type of steps ------------------------------------------------------------------------------------------- * - (hint) uncomment line below and fill todo 2 with * (1) for interval data type: intervaldatatypes.steps ******************************************************************************************/ readaggregateddatarequest readaggregateddatarequest = readaggregateddatarequest.builder() .settimespec( timespec.builder() .setstartlocaldatetime(localdatetime.now().with(localtime.midnight)) .build()) //.addcumulativeaggregationspec(cumulativeaggregationspec.builder("todo 2 (1)").build()) .build(); read cumulative steps count from cumulativedata: set variable steps value to 0l. it is the count of daily steps. get aggregatedvalue object using cumulativedata api. cumulativedataaggregateddata representing total of intervaldata over a period of time (e.g. total steps in a day). public aggregatedvalue gettotal () check the result. if it is not null, get aggregated value using aggregatedvalue api: aggregatedvaluevalue fields aggregated over a period of time. only numeric fields (longfield, doublefield) can be included in aggregation. public long getlongvalue () returns all longfields and their values that are already set. add value to the daily steps result counter. /******************************************************************************************* * [practice 3] read aggregated value from cumulative data and add them to the result * - get aggregatedvalue from cumulativedata object * - get steps count from aggregatedvalue object ------------------------------------------------------------------------------------------- * - (hint) uncomment lines below and replace todo 3 with parts of code * (1) get aggregatedvalue object 'obj' using cumulativedata.gettotal() * (2) get value using obj.getlongvalue() and add to the result ******************************************************************************************/ long steps = 0l; if(result != null) { list<cumulativedata> cumulativedatalist = result.getcumulativedatalist(); if (!cumulativedatalist.isempty()) { for(cumulativedata cumulativedata : cumulativedatalist) { //"todo 3 (1)" //"todo 3 (2)" } } } return steps; run unit tests for your convenience, you will find an additional unit tests package. this will let you verify your code changes even without using a physical watch. see instruction below on how to run unit tests: right click on com.samsung.sdc21.stepcount (test) and execute run 'tests in 'com.samsung.sdc21.stepcount'' command. if you completed all the tasks correctly, you will see all the unit tests passed successfully. run the app after building the apk, you can run the application on a connected device to see real-life aggregated steps count measured by a smartwatch. right after the app is started, it will request for the user permission. allow the app to receive data of the activity. afterwards, the application main screen will be shown. it will automatically display today’s step count. tap on refresh button to read current steps count from health platform. you're done! congratulations! you have successfully achieved the goal of this code lab. now, you can create a daily step counter app by yourself! if you're having trouble, you may download this file: health step count complete code (119.79 kb) learn more by going to health platform.

      https://developer.samsung.com/codelab/health/daily-step-counter.html
      No Search Results
      No Search results. Try using another keyword.
      • <<
      • <
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • >
      • >>
      Samsung Developers
      Samsung Developers
      Quick Link
      • Android USB Driver
      • Code Lab
      • Galaxy Emulator Skin
      • Foldables and Large Screens
      • One UI Beta
      • Remote Test Lab
      • Samsung Developers Podcast
      Family Site
      • Bixby
      • Knox
      • Samsung Pay
      • SmartThings
      • Tizen
      • Samsung Research
      • Samsung Open Source
      • Samsung Dev Spain
      • Samsung Dev Brazil
      Legal
      • Terms
      • Privacy
      • Open Source License
      • Cookie Policy
      Social Communications
      • Facebook
      • Instagram
      • Twitter
      • YouTube
      • Buzzsprout
      • Rss
      • Linkedin
      • System Status
      • Site Map
      • System Status
      • Site Map
      • facebook
      • instagram
      • twitter
      • youtube
      • buzzsprout
      • rss
      • linkedin

      Copyright © 2023 SAMSUNG. All rights reserved.