Filter
-
Content Type
-
Category
Mobile/Wearable
Visual Display
Digital Appliance
Platform
Mobile/Wearable
Visual Display
Digital Appliance
Platform
Recommendation
Filter
Connect Samsung Developer Conference
webtech square products and services using our new technology are displayed in the space by each field, and you can find details in the keynote speech and sessions. platform innovation home & health experience mobile & screen experience sustainability category platform innovation home & health experience mobile & screen experience sustainability smartthings matter/hub the most comprehensive iot platform for matter. the matter-compatible smartthings hub has been deeply integrated across samsung tvs, family hub refrigerators, smart monitors, and mobile chargers. working together, these hubs can form a multi-hub network for wider coverage and better reliability. setting up a new hub is also easier than ever with our new hub replacement tool. smartthings find & galaxy smarttag2 to keep your belongings and loved ones safe, you can use the newly updated smartthings find and smarttag2. with the new lost mode, someone who has found your misplaced key simply can tap their phone to the tag2 to contact you. you can even use tag2 to keep your pets healthy. attach a tag2 to your dog’s collar and keep track of their walking habits. smartthings home view smartthings home view provides an indoor map of your home, allows you to set the location of rooms and easily control your home devices at once, and displays environmental information such as room temperature and humidity, making your smart device experience easier and more intuitive. we also provide various ways to create indoor maps using ai technology. smartthings tv experience find out more about enhanced tv experiences with smartthings, including ring my phone, built-in smart home hub and home monitoring, and on a galaxy smart phone, the quick tv remote functionality. wwst partner find out about upcoming "works with smartthings" partner devices, including interesting gadgets, harman speakers, and presence sensors. calm onboarding calm onboarding is a stepping stone to a convenient life. it allows the user to complete device registration in the background by linking product purchase information, or by temporarily registering nearby devices and completing the final confirmation - the user just needs to have a previously registered device to connect to. smartthings ecosystem wall smartthings has been developed with support for the matter protocol and hca standards. it's an ever-evolving system, continually expanding user device options and enhancing usability. in close partnership with major home iot companies like philips hue / aeotec and other device-focused allies, we're delivering unique advantages to both partners and end-users. back to previous page vision ai pro cooking: bespoke view camera oven and camera wall oven the vision ai pro cooking camera oven optimizes cooking settings while monitoring food. if the oven is set to cook a recognized dish, it recommends a cooking mode, temperature, and time. the user can see how their meal is coming along in real time. during cooking, the oven detects cooking status, and afterwards, creates a time-lapse. screens everywhere at home we are building a screen ecosystem by expanding the tizen os to all of our home appliances. in this booth, we will display a family hub refrigerator with a 32-inch screen and a wall oven with a 7-inch screen, which you can use to experience various services such as multimedia, iot, and ai. samsung food: food your way samsung food offers a single platform to take you from "what’s for dinner?" to food on the table. discover recipe inspiration and storage, meal planning, nutritional information, automatic shopping lists, guided cooking, and sharing recipes and reviews with your friends. we put the world’s food knowledge at your fingertips! expand your health experience with samsung health making healthy habits easier with samsung health and new galaxy watch. samsung health can help you develop healthy habits by providing insights on what you’re doing well and what needs improvement, based on measurement data. leveraging galaxy watch's advanced health sensors tracking of raw or processed health sensor data from a galaxy watch is available through the samsung privileged health sdk. specialized features of the galaxy watch, like body composition and skin temperature measurements, can easily be utilized in wear os applications. the sdk maintains low watch battery consumption during continuous data tracking. empowering research & clinical experiences with samsung health stack samsung health stack is an open source project that provides end-to-end solutions such as application sdk, web portal, and backend systems for various use cases from medical research studies to clinician services using wearable devices. in this booth, you can explore all features of samsung health stack and check out some of its real-world use cases. back to previous page where gaming comes together gaming hub is an all-in-one platform where users can spend more time together and enjoy a variety of games through streaming, with over 3,000 titles from industry-leading partners. in addition, we'll be demonstrating to game developers how to utilize gamepads effectively with live demos, and have content for gamepad manufacturers interested in tv integration. deliver the best multi-device experience between samsung devices multi-control allows you to control two or more devices at the same time with a keyboard or mouse. you can access content such as news and netflix using your mouse, without needing the remote control, and then immediately continue using the mouse to work with your pc. introduction to iris (instant rendering & immediate sign-off) for hdr10+ gaming iris is a software tool that provides real-time, simulated rendering of hdr10+ gaming, hdr10, or sdr on multiple connected displays. this exhibition covers the overview of hdr10+ gaming, iris features, and how game developers can utilize it for their development and qc process. currently, iris works based on an nvidia api for the hdr10+ gaming communication protocols. feel the pleasure and value of being together with witty conversations chat together lets you talk remotely while watching your favorite tv programs. a click on a pop-up notification will start a chat together session. you can chat using either ai-recommended text and emojis, voice input, or mobile application and web browser. we are also developing other tv applications that provide togetherness experiences with a tv chat open api and platform. camera experience for tv any application that uses a camera can join camera experience. so far, we have a video call, workout, health care and gesture applications. you can easily create camera applications for tv by using our open api and platform. cheering together with emoticons and enjoyable events while watching sports cheer together lets you move beyond just watching tv, by providing experience that family and others can share while watching sports, through cheering emoticons and co-participating in events according to the cheering mood. we are planning to auto-generate emoticons with the user's voice to provide them with more ways to express enjoyment. remote test lab for tv remote test lab is a solution that makes it easy for tv application developers to use any real tvs they want. if you have an internet-connected pc, you can configure a remote development environment using a real tv. we support various models based on product and year, and no further effort is required to get access to specific models. all you need is your pc. smart edge blending - merge screens using two freestyle 2023 projectors. to use smart edge blending, two freestyle projectors are placed horizontally or vertically, and the edge blending function, which connects the images, is set up by taking a picture on the smartthings mobile application. samsung wallet: add to wallet add to samsung wallet is an e-wallet service that allows customers using samsung devices to add various digitized contents to samsung wallet. users can add their event tickets, coupons, boarding passes, and other types of data into samsung wallet using "add to samsung wallet" buttons in applications, web pages, e-mail, or social media messages by various content providers. samsung wallet: online payment check out faster in our payment apps. there's no need to enter your credit card number for in-app or online purchases—simply select samsung pay at checkout and authenticate the purchase with your fingerprint or pin. samsung wallet: student / company id add your student or company id to samsung wallet to make access simple. open doors, get into the library and events, pay for lunch, and more with just a tap of your phone or watch. experience the convenience of your student or company id working when your screen is off and your phone is locked, and even when your battery runs out. samsung wallet: mobile driver’s license / state id users will soon be able to add their driver’s license or state id to samsung wallet. initially, mobile driver’s licenses / state ids will work in a limited number of states at select tsa checkpoints to verify an id with just a tap. advanced professional video codec the advanced professional video (apv) codec is a new video codec for prosumers who want cinematic-quality video recording and post-production with smart phones. the apv codec provides perceptually lossless video quality and consumes 20% less storage compared to existing formats. back to previous page net zero home: build a sustainable home with smartthings energy smartthings energy connects everything from solar panels to your ev chargers to build a sustainable home. through partnership, smartthings energy lets you manage your energy production, storage and consumption and lowers your monthly energy bill and carbon footprint. open license for solar cell remote tech the solar cell remote is eco-friendly remote controller made out of recyclable materials that creates no battery waste, and incorporates improvements based on research into the potential environmental pollutants caused in remote control production. by opening the solar cell remote control technology to everyone, eco-friendly technology can be distributed wider. intelligent power saving intelligent power saving is power reduction based on human vision characteristics. a deep learning algorithm identifies regions of non-interest, which helps in reducing power consumption without letting the user notice any changes in the image. relumino mode relumino mode improves visual accessibility by making it easier to recognize objects. the edge thickness and colors in the image can be controlled depending on the user's vision level. the "together mode" supports a social tv watching experience, by displaying the original and relumino mode videos at the same time, allowing users to watch tv with their families. spoken subtitles people with low vision, or who cannot read the subtitles, will better understand foreign content such as movies if the tv gives them narration by reading the subtitles out loud. resource circulation gallery our goal at samsung is to apply recycled resin to 100% of the plastic components used in our products by 2050. we're using materials like fishing nets and recycled glass for samsung galaxy products, crafting tv covers from low-carbon resin captured from carbon emissions, and developing microplastic-filtering technology to reduce marine pollution. circular factory we’re highlighting samsung's processes for upcycling waste, showing how our research is integrated into products. we’re uncovering recyclable materials from waste products and are creating a roadmap for how that waste can be reintegrated into samsung products. back to previous page
FAQ health
docfaq what are the benefits of the samsung health data sdk? samsung health has various features to measure the health data of users it allows for automatically measuring vital signs and recording activities with connected accessories these accessories include galaxy watch, galaxy fit, galaxy ring, a blood glucose monitor, and a weight scale users can track, for example, their daily steps, heart rate, sleep, nutrition, and other data managing a healthy lifestyle is easier and simpler with samsung health the samsung health data sdk allows android applications to read selected health data from samsung health’s data store you can use this data to build custom applications related to such interests as general health monitoring, improving sleep conditions, tracking progress of physical activity, and more how do i get access to the samsung health data sdk and documentation? you can access the samsung health data sdk library download and documentation from here which devices is the samsung health data sdk available for? the samsung health data sdk runs on devices with android 10 api level 29 or above it is available on all samsung smartphones and non-samsung phones the samsung health application has the same device requirements the samsung health data sdk requires prior samsung health installation more information about the limitations is available here what kind of data can i read from samsung health? an application using the samsung health data sdk can read saved health data in samsung health, such as steps, exercise, and sleep data all available health data are listed here when i test the application, i get the `2003 permission not allowed due to sdk policy error` how can i fix it? if you see this error, please check that your application package name registration and the distributed application’s signature sha-256 are the same with your request to the samsung health team if they are the same, you can ask for an information change at samsung developer site > support > developer support additionally, for application testing purposes, please use the developer mode of the samsung health data sdk it can be enabled in samsung health; for more information, see here i received the `platform_not_installed` or `old_version_platform` exception how do i fix this? the samsung health data sdk runs with the samsung health application if the samsung health application is not installed or the installed version is too old, the samsung health data sdk gives the following exceptions platform_not_installed occurs if the samsung health application is not installed on the phone old_version_platform occurs when the installed samsung health version is older than required by the samsung health data sdk it can be resolved by invoking resolvableplatformexception resolve activitycontext this api enables your application to jump to the right market page to install or update the samsung health application i receive the `err_no_user_permission` error how do i fix this? accessing samsung health’s data requires the user’s agreement for the sdk data permissions you can resolve this error by calling one of the following apis with the necessary data permissions for your application healthdatastore requestpermissions set<permission>, activity healthdatastore requestpermissionsasync set<permission>, activity these apis display a data permission pop-up to the user and the user can then allow each data permission avoid annoying the user with endlessly repeating permission requests if the user denies few times, stop requesting permissions instead, provide a proper guide message with your application setting menu information to let them know they should allow data permissions with samsung health how can i solve the error_access_control error? it means that the data type is not included in the available data scope for your application to solve this issue, please submit your query at the samsung developer site > support > developer support the health team will check your query and reply can i distinguish a source device of health data? each data point has data source information including the device id indicating which device provided the health data you can retrieve the source device’s details devicemanager getdevice deviceid string device the datatype in the device’s details can be a galaxy watch, galaxy ring, galaxy fit, a smartphone, or a health accessory device you can use this information to filter data points how can i check which data have been changed using the samsung health data sdk? new or deleted data can be checked on demand each time the application invokes the readchange api, the modified data will be returned healthdatastore readchanges and healthdatastore readchangesasync provide data change information for a given data type and a time filter these apis give a change type indicating new, updated, or deleted data a data id if the data has been deleted a data point for new or updated data a changed time can i insert data into samsung health using health data sdk? the functionality of inserting data into samsung health with samsung health data sdk is already available to write health data into the samsung health, request partnership as the app creation process after approval of your request, an access code to write data on the developer mode will be provided that access code is available for one application please check the developer mode for more information
Connect Samsung Developer Conference
weba memorable sdc22 experience, thanks to you! smartthings shapes a new era of calm technology with effortless connectivity. watch the sdc22 keynote and tech sessions on demand. samsung developer conference 2022 october 12, 2022 at moscone north (san francisco) and online video thumbanil highlights though sdc22 has ended, the innovation lives on! whether you missed the event or just want to revisit the highlights, you can watch the excitement on demand. keynote discover samsung’s broad ecosystem of powerful, next-level tech and hear how samsung is building toward a smarter, safer, and more personally connected future. view keynote tech sessions view tech sessions dive into the future of connected customer experiences through tech sessions by developers offering further insight into the innovations introduced in the keynote. sessions mobile, design, ui/ux what’s new in one ui 5 an introduction to the key new features of one ui 5. sessions iot, contents & service, open innovation smartthings find: find alongside 200+ million users learn about the growth of smartthings find and how you can harness its power to better your product. sessions enterprise, tizen tizen everywhere tizen enterprise platform will provide all the technology infrastructure for enterprise display. tizen tv release in europe, austrailia, turkey. sessions health, tizen telehealth in samsung devices meet your doctor in a bigger screen. samsung x healthtap brings new experience to smart tvs & smart monitors for easy access to health checkups. sessions iot, tizen, ui/ux what's new in tizen? through this session, you can see new features on tizen 7.0 and how intelligent iot platform tizen is preparing for the future. sessions iot, monetization, smart appliances smartthings energy service introduction of smartthings energy service and benefits of a seamless energy management. speaker list check out the speakers who joined us at sdc22 to share their experience and expertise, and get a sense of what you can expect from next year’s sdc event. go to speaker list code labs go to code lab get hands-on with the latest development features through new code lab topics and samples introduced for sdc22. bixby smartthings control a smart bulb control a smart light bulb and change its color using bixby home studio. 30 mins start watch face studio apply conditional lines on watch faces learn how to create a watch face that responds to time and notification using conditional lines in watch face studio. 20 mins start samsung wallet add boarding passes, tickets, and coupons learn how to integrate the add to wallet functionality with partner services, enabling users to add boarding passes, tickets, and coupons to samsung wallet. 30 mins start previous events watch highlights of selected sessions from sdc events since 2016. sdc21 october 26, 2021online sdc19 october 29–30, 2019mcenery convention centersan jose, california sdc18 november 8-9, 2018moscone westsan francisco, california sdc17 october 18-19, 2017moscone westsan francisco, california sdc16 april 27-28, 2016moscone westsan francisco, california
Develop Health
docdata | stepdiary stepdiary sample download dec 5, 2024 the sdk's health data provides a stepdiary sample application to read the daily step count prerequisites prerequisites to run stepdiary are prepare an android device that supports android 10 api level 29 or above samsung and non-samsung devices are available both add the stepdiary app's dev access code developer mode client id com samsung android app stepdiary access code lm13wujx import stepdiary with android studio or eclipse run stepdiary on the device overview stepdiary demonstrates how to use health data's apis for retrieving the daily step count with healthconstants stepcount and daily step count trend data types it shows how to handle the step's binning data every 10 minutes stepdiary's sources and resources are source / resource description androidmanifest xml declaring required permissions with the <meta-data> element java/com/samsung/android/app/stepdiary stepdiaryactivity kt stepdiary's main activity connecting to the health data store and handling exceptions through connectionlistener checking permission to read healthconstants stepcount and daily step count trend requesting permission if required creating an option menu for setting permission showing daily step count stepcountreader kt reading today's healthconstants stepcount asynchronously reading today's healthconstants stepdailytrend it checks the total step count and binning data every 10 minutes
events
blogthe 10th anniversary of the samsung developer conference (sdc24) took place on october 3rd, 2024, at san jose mcenery convention center in san jose, california and online. alongside other exciting activities and showcasing of the latest technological advances, code lab offered attendees the opportunity to engage in hands-on experiences and deep dive into the latest samsung sdks and tools. code lab allows tech enthusiasts and developers of all skill levels and interests to learn about the diverse world of samsung development. this year's code lab covered a range of topics related to smartthings, samsung health, samsung wallet, and automotive. 1. smartthings participants actively engaged in creating a smartthings edge driver for a smart device and resolved edge driver issues using the smartthings test suite. they also designed their own smartthings find-compatible device. these activities are now available online for continued learning. moreover, participants discovered how to use generative ai in routine generation and 3d object creation. although exclusive to sdc24, these activities provided a glimpse of the upcoming generative ai feature in the smartthings app. 2. samsung health the new samsung health data sdk was presented to participants through two health-focused activities. the participants developed android apps capable of gathering and analyzing data from the samsung health app and connected wearable devices, including step count and sleep patterns. additionally, participants learned how to easily establish a health research platform utilizing the samsung health research stack, an open-source toolkit, allowing data collection from mobile and wearable devices and visualization through a web portal. 3. samsung wallet participants were taught two methods to integrate the samsung pay payment system into services, including utilizing the web checkout sdk for websites and incorporating the samsung pay sdk flutter plugin for in-app payments within flutter-based applications. they also acquired knowledge on maximizing the capabilities of samsung wallet, particularly learning how to utilize the add to samsung wallet service to store digital assets like boarding passes, tickets, and coupons within the samsung wallet application. furthermore, they learned how to add a button in websites or android apps to authenticate users' identities using the id information stored in the wallet app. 4. automotive participants had the opportunity to develop an in-vehicle app for android automotive os (aaos) using templates from aaos and ignite store. the app incorporated payment processing functionality through the ignite payment sdk, powered by samsung checkout. with guidance from mentors at harman international, a subsidiary of samsung, participants gained valuable knowledge into app development specifically tailored for the automotive industry. this marked the first code lab activity focused on automotive applications. the samsung developer conference promotes innovation and collaboration in the tech industry. by offering a wide variety of subjects in code lab, participants are given the necessary resources and expertise to expand the limits of what can be achieved within samsung's ecosystem. although sdc24 has concluded, the innovative spirit lives on! for those who missed out on the event or simply desire to explore additional activities, the code lab page offers endless possibilities accessible at any time, from any location.
Christopher Marquez
events iot, health, game, design, mobile, galaxy watch, foldable
blogthe samsung developer conference 2023 (sdc23) happened on october 5, 2023, at moscone north in san francisco and online. among the many exciting activities at the conference for developers and tech enthusiasts, code lab offered a unique opportunity to learn about the latest samsung sdks and tools. code lab is a hands-on learning experience, providing participants with a platform to explore the diverse world of samsung development. code lab activities are accessible for developers of all skill levels and interests, ensuring that everyone, from beginners to experts, can find something exciting to explore. covering a wide array of topics within the code lab, the conference catered to the diverse interests of the participants. here's a quick look at some of the sdc23 topics: 1. smartthings participants had the chance to build a matter iot app using the smartthings home api and create virtual devices that they could control using the smartthings app or their own iot apps. they also learned how to develop a smartthings find-compatible device. these topics are all about connecting and enhancing the smart home experience. 2. galaxy z participants, who are interested in foldable technology, were able to develop a widget for the flex window. this topic opens new possibilities in app design and user interaction. 3. samsung wallet participants learned to integrate the "add to samsung wallet" button into sample partner services. they also learned to implement in-app payment into a sample merchant app using the samsung pay sdk. these topics focus on enhancing the mobile wallet experience for samsung users. 4. gamedev game developers and enthusiasts had the opportunity to optimize game performance with adaptive performance in unity. they also learned to implement flex mode into unity games for foldable phones. these topics offer insights into the gaming industry's latest trends and technologies. 5. watch face studio code lab also provided an activity for participants to create a watch face design with customized styles using watch face studio. participants also learned how to convert the watch face design for galaxy z flip5's flex window display using the good lock plugin. 6. samsung health the health-focused code lab topics covered measuring skin temperature on galaxy watch and transferring heart rate data from galaxy watch to a mobile device with the samsung privileged health sdk. participants also learned how to create health research apps using the samsung health stack. these topics provide valuable insights into the health and fitness tech landscape. from creating virtual devices to building health-related apps, participants left the conference with new knowledge they could apply to their development projects. the samsung developer conference is a celebration of innovation and collaboration in the tech world. with a diverse range of topics in code lab, participants were equipped with the tools and knowledge to push the boundaries of what is possible in samsung's ecosystem. though sdc23 has ended, the innovation lives on! whether you missed the event or just want to try other activities, you can visit the code lab page anytime, anywhere. we can't wait to see you and the innovations that will emerge from this conference in the coming years. see you at sdc24!
Christopher Marquez
Develop Health
apioverviewpackageclasstreedeprecatedindex com samsung android sdk healthdata interface healthdataresolver insertrequest enclosing class healthdataresolver public static interface healthdataresolver insertrequest this interface is able to make a request to insert health data for the specific health data type request for inserting data healthdataresolver insert helps that your application saves a new measured data to samsung health the following information is mandatory to build an insertrequest instance mandatory information description data type set the data type with insertrequest builder setdatatype source device the device id that provides health data set it with healthdata setsourcedevice data's mandatory properties set mandatory properties of the health data type by referring to data type definition you can make a request instance with insertrequest builder build inserting data example you can save health data to samsung health with healthdataresolver insert after setting detailed property values of the created healthdata instance the health data framework registers the current device where your application is installed if the source device is the current device, its id can be checked as shown below // the state of connection private final healthdatastore mstore; public static final string app_tag = "myapp"; private void insertglucose long start, long offset, float value { // set the source device as the current device healthdevice mydevice = new healthdevicemanager mstore getlocaldevice ; healthdata data = new healthdata ; data setsourcedevice mydevice getuuid ; and the data instance's properties including mandatory ones needs to be set // set properties including mandatory ones data putlong healthconstants bloodglucose start_time, start ; data putlong healthconstants bloodglucose time_offset, offset ; data putint healthconstants bloodglucose measurement_type, healthconstants bloodglucose measurement_type_whole_blood ; the measured data value needs to be set after checking defined data unit each property in api reference lets you know it in this case, see healthconstants bloodglucose glucose data putfloat healthconstants bloodglucose glucose, value ; an insertrequest instance is created by insertrequest builder build with setting the data type it's ready to add data to samsung health if the data is added to the insertrequest healthdataresolver insertrequest insrequest = new healthdataresolver insertrequest builder setdatatype healthconstants bloodglucose health_data_type build ; // add health data insrequest addhealthdata data ; healthdataresolver resolver = new healthdataresolver mstore, null ; try { resolver insert insrequest setresultlistener mistresult ; } catch exception e { log d app_tag, "resolver insert fails " ; } } healthdataresolver insert com samsung android sdk healthdata healthdataresolver insertrequest sends a request to samsung health a data validation exception is received in healthresultholder baseresult it gives a request's result state and a number of inserted data private final healthresultholder resultlistener<healthresultholder baseresult> mistresult = new healthresultholder resultlistener<healthresultholder baseresult> { @override public void onresult healthresultholder baseresult result { if result getstatus != status_successful { // check the error } else { // check the count of inserted data log d app_tag, "count of inserted data " + result getcount ; } } }; since 1 0 0 nested class summary nested classes modifier and type interface and description static class healthdataresolver insertrequest builder this class is a builder to configure healthdataresolver insertrequest method summary all methods instance methods abstract methods modifier and type method and description void addhealthdata healthdata object adds health data to insert void addhealthdata list<healthdata> objectlist adds a health data list to insert method detail addhealthdata void addhealthdata healthdata object adds health data to insert parameters object - the health data instance the source device of object should be valid throws illegalargumentexception - if source device is not set or data is null since 1 0 0 addhealthdata void addhealthdata list<healthdata> objectlist adds a health data list to insert parameters objectlist - the list of health data objects the source device for each health data has to be defined in advance throws illegalargumentexception - if source device is not set or data list is null since 1 0 0
Develop Health
docnotesamsung health sdk for android partners, please migrate to samsung health data sdk to access additional health data types and continue to utilize existing data types supported via samsung health sdk for android samsung health sdk for android has been deprecated please find instructions to migrate to samsung health data sdk migration guide from samsung health sdk for android to samsung health data sdk following the release of samsung health data sdk, samsung health sdk for android will be deprecated in few months after this transition, partner apps that currently use samsung health sdk for android need to transition to samsung health data sdk benefits of migrating to samsung health data sdk samsung health data sdk enables apps to access health data in the samsung health app on android smartphones not only does it offer the functionality as samsung health sdk for android, but it also provides various additional advantages compared to samsung health sdk for android, samsung health data sdk applies the service logic displayed in the samsung health app's trackers and provides more specialized data from the app this allows health service providers to gain a better understanding of users' health indicators for example, to retrieve the same step count data displayed in the samsung health app when using samsung health sdk for android, you need to set the data type as stepdailytrend set filters for both the time period source_type_all this ensures that you receive the same step count data that`s displayed in the samsung health app samsung health sdk for android code val healthdataresolver = healthdataresolver healthdatastore, null val date = localdate now atstartofday toinstant zoneoffset utc toepochmilli val filter = filter and filter eq stepdailytrend day_time, date , filter eq stepdailytrend source_type, stepdailytrend source_type_all val stepsrequest = healthdataresolver readrequest builder setdatatype stepdailytrend health_data_type setfilter filter build with samsung health data sdk, you can simplify a data request by utilizing the total aggregator and only applying a time filter this data request allows you to retrieve the daily total step count displayed in the samsung health app without considering the potential oversight of setting the source type to `all' samsung health data sdk code val starttime = localdate now atstartofday val endtime = localdatetime now val localtimefilter = localtimefilter of starttime, endtime val stepsrequest = datatype stepstype total requestbuilder setlocaltimefilter localtimefilter build samsung health data sdk provides various goal data types, such as step goal, sleep goals, and active calories burned goal goal data types help to provide appropriate guidance to users samsung health data sdk can read, write, update, and delete health data in the samsung health app it can also retrieve associated data related to specific data for example, the samsung health app continuously measures blood oxygen and skin temperature during sleep samsung health data sdk allows you to easily retrieve blood oxygen and skin temperature data related to this specific sleep data samsung health sdk for android will remain operational for at least 2 years after its deprecation after a certain period, this sdk will be removed, so we recommend updating your app to use samsung health data sdk instead development process previously samsung health sdk for android required developers to submit requires a partner request to get access to be applied for and approved before use now with samsung health data sdk you can download and use the sdk in developer mode without submitting a partner request to enhance the convenience of more developers, the samsung health data sdk has improved its developer mode functionality if you only need to read the samsung health app's data, you can activate the developer mode and proceed with development and testing without requiring the partner request if you want to test writing data to the samsung health app using the samsung health data sdk or to distribute your app, you need to submit a partner request registration is necessary if you want to see the detailed process for developing an app with the samsung health data sdk can be found on, please refer to the process page checking supported data types of samsung health data sdk before you start using samsung health data sdk, please, compare it with samsung health sdk for android and its existing data types to determine whether the data types you want to use in your app are supported and what additional data can be utilized category data type of the samsung health sdk for android sdk corresponding data type in the samsung health data sdk activity healthconstants exercise exercisetype healthconstants floorsclimbed floorsclimbedtype healthconstants stepdailytrend read-only stepstype read-only healthconstants stepcount read-only not provided not provided stepgoaltype read-only not provided activitysummarytype read-only not provided activecaloriesburnedgoaltype read-only not provided activetimegoaltype read-only food intake healthconstants nutrition nutritiontype not provided nutritiongoaltype read-only healthconstants waterintake waterintaketype not provided waterintakegoaltype read-only rest healthconstants sleep sleeptype healthconstants sleepstage not provided not provided sleepgoaltype read-only healthcare healthconstants bloodglucose bloodglucosetype healthconstants bloodpressure bloodpressuretype healthconstants bodytemperature bodytemperature healthconstants heartrate heartratetype healthconstants oxygensaturationtype bloodoxygentype healthconstants weight bodycompositiontype not provided skintemperature score not provided energyscoretype read-only user profile healthuserprofile read-only userprofiledatatype read-only checking the user experience to access health data from samsung health data sdk, you need to receive data permissions and obtain user consent in order to do that, please, follow the same process as samsung health sdk for android you can request data permissions at requesting data permissions note when using both sdks together, the data permissions of each sdk are displayed to the user, which can result in an inconvenient ui for the user hence, we recommend to use samsung health data sdk data permission of samsung health sdk for android data permission of samsung health data sdk getting started 1 download samsung health data sdk visit samsung health data sdk page to download samsung health data sdk 2 enabling samsung health data sdk’s developer mode if you only need to read data from samsung health app, you can enable the developer mode feature without submitting an additional partner request refer to the developer mode for instructions on how to enable it if you want to write data to samsung health app, you need to submit a partner request 3 importing samsung health data sdk's library remove the library of samsung health sdk for android from your app project samsung-health-data-a b c aar and add samsung health data sdk's library to the app/libs folder samsung-health-data-api-a b c aar note that 'a b c' is the sdk's version 4 update app manifest if your app's manifest has the element for the samsung health app, please remove it app manifest - remove the element for samsung health sdk for android <manifest > <queries> <package android name="com sec android app shealth" /> </queries> </manifest> if the app manifest has the element lines related to health data permissions of samsung health sdk for android, please remove it app manifest - remove the data permission declarations for samsung health sdk for android <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" </application> </manifest> 5 gradle settings in the app/builde gradle, remove the dependency for samsung health sdk for android app/build gradle - remove the dependency for samsung health sdk for android dependencies { implementation files 'src/main/libs/samsung-health-data-1 5 1 aar' } add the dependency for samsung health data sdk instead app/build gradle - add the dependency for samsung health data sdk dependencies { implementation filetree mapof "dir" to "libs", "include" to listof "* aar" } add the gson library in the dependency app/build gradle - add the dependency for samsung health data sdk dependencies { implementation "com google code gson gson 2 9 0" } and apply the kotlin-parcelize plugin to the app/build gradle app/build gradle - add the plugin for samsung health data sdk plugins { id "kotlin-parcelize" } 6 connecting with samsung health to access health data in the samsung health app, you need to connect the sdk with the samsung health app if the samsung health app is not installed or you have an earlier version of the samsung health app than the supported version, an exception occurs after the connection request if it is a resolvable exception, call the resolve api is to resolve the exception below is an example code snippet when using samsung health sdk for android connecting with samsung health with samsung health sdk for android lateinit var healthdatastore healthdatastore fun connect activity activity { healthdatastore = healthdatastore context, object healthdatastore connectionlistener { override fun onconnected { log i app_tag, "health data service is connected" } override fun onconnectionfailed error healthconnectionerrorresult { if error hasresolution { error resolve activity } else { log i app_tag, "health data service is not available" } } override fun ondisconnected { log i app_tag, "health data service is disconnected" } } runcatching { healthdatastore connectservice } onfailure { error -> error message? let { log i app_tag, it } } } to connect to the samsung health app using samsung health data sdk, you can do so as shown in the code below connecting with samsung health with samsung health data sdk lateinit var healthdatastore healthdatastore fun connect activity activity { runcatching { healthdatastore = healthdataservice getstore context } onsuccess { log i app_tag, "health data service is connected" } onfailure { error -> if error is resolvableplatformexception && error hasresolution { error resolve activity } // handle other types of healthdataexception error message? let { log i app_tag, it } } } 7 requesting data permissions after you have successfully connected to the samsung health app, you need to request data permissions for the health data you want to access from the user upon obtaining an explicit consent from the user, you will be able to access the health data before requesting data permission, check if the user has already granted the data permission if the required data permission has not been obtained, proceed to request the necessary data permission the following code is an example of requesting data permissions to read daily step count, nutrition, and user profile data when using samsung health sdk for android requesting data permission with samsung health sdk for android private val permissionlistener healthresultholder resultlistener<permissionresult> = healthresultholder resultlistener<permissionresult> { result -> if result resultmap values contains false { log i app_tag, "not all required permissions granted" } else { log i app_tag, "all required permissions granted" } } fun requestpermissions activity activity, healthdatastore healthdatastore { val permissionset = setof permissionkey stepdailytrend health_data_type, healthpermissionmanager permissiontype read , permissionkey nutrition health_data_type, healthpermissionmanager permissiontype read , permissionkey healthconstants user_profile_data_type, healthpermissionmanager permissiontype read val permissionmanager = healthpermissionmanager healthdatastore runcatching { val grantedpermissions = permissionmanager ispermissionacquired permissionset if grantedpermissions values all { it } { log i app_tag, "all required permissions granted" } else { log i app_tag, "not all required permissions granted" permissionmanager requestpermissions permissionset, activity setresultlistener permissionlistener } } onfailure { error -> error message? let { log i app_tag, it } } } when the above code is executed, the following screenshot shows the data permission popup displayed to the user when using the samsung health data sdk, you can do the following requesting data permission with samsung health data sdk suspend fun requestpermissions healthdatastore healthdatastore, activity activity { val permissionset = setof permission of datatypes steps, accesstype read , permission of datatypes nutrition, accesstype read , permission of datatypes user_profile, accesstype read val grantedpermissions = healthdatastore getgrantedpermissions permissionset if grantedpermissions containsall permissionset { log i app_tag, "all required permissions granted" } else { healthdatastore requestpermissions permissionset, activity } } when requesting data permissions with samsung health data sdk, the following screenshot will be displayed to the user 8 data request asynchronous request asynchronous operations allow the application to continue processing other tasks without waiting for the current task to complete it prevents the main thread from being blocked it enhances user experience by keeping the application interactive during long-running tasks and supports efficient handling of concurrent operations below you can see a code example of when using samsung health sdk for android to make an asynchronous request asynchronous request when with samsung health sdk for android fun readstepsasync healthdatastore healthdatastore { val healthdataresolver = healthdataresolver healthdatastore, null val date = localdate now atstartofday toinstant zoneoffset utc toepochmilli val filter = filter and filter eq stepdailytrend day_time, date , filter eq stepdailytrend source_type, stepdailytrend source_type_all val stepsrequest = healthdataresolver readrequest builder setdatatype stepdailytrend health_data_type setfilter filter build try { healthdataresolver read stepsrequest setresultlistener { result -> try { val iterator = result iterator if iterator hasnext { val healthdata = iterator next val stepcount = healthdata getint stepdailytrend count log i mainactivity app_tag, "step count $stepcount" } } finally { result close } } } catch exception exception { exception message? let { log i mainactivity app_tag, it } } } when using samsung health data sdk, you can perform the same operation as follows use an api that includes async asynchronous request with samsung health data sdk fun readstepsasync healthdatastore healthdatastore, activity activity { val starttime = localdate now atstartofday val endtime = localdatetime now val localtimefilter = localtimefilter of starttime, endtime val stepsrequest = datatype stepstype total requestbuilder setlocaltimefilter localtimefilter build healthdatastore aggregatedataasync stepsrequest setcallback looper getmainlooper , { result -> val stepcount = result datalist first value log i mainactivity app_tag, "step count $stepcount" } { error -> if error is resolvableplatformexception && error hasresolution { error resolve activity } } } synchronous request synchronous operations execute tasks sequentially, requiring the application to wait for the current task to complete before proceeding to the next while this approach is simple to implement and ensures a predictable execution flow, it can block the main thread this makes synchronous operations more suitable for straightforward, short tasks rather than complex or concurrent processes to perform synchronous operations when using samsung health sdk for android, you can use the await api synchronous request with samsung health sdk for android fun readstepssync healthdatastore healthdatastore { val healthdataresolver = healthdataresolver healthdatastore, null val date = localdate now atstartofday toinstant zoneoffset utc toepochmilli val filter = filter and filter eq stepdailytrend day_time, date , filter eq stepdailytrend source_type, stepdailytrend source_type_all val stepsrequest = healthdataresolver readrequest builder setdatatype stepdailytrend health_data_type setfilter filter build try { healthdataresolver read stepsrequest await run { try { val iterator = iterator if iterator hasnext { val healthdata = iterator next val stepcount = healthdata getint stepdailytrend count log i mainactivity app_tag, "step count $stepcount" } } finally { close } } } catch exception exception { exception message? let { log i mainactivity app_tag, it } } } for synchronous operations involving samsung health data sdk, please, use the following approach synchronous request with samsung health data sdk suspend fun readstepssync healthdatastore healthdatastore { val starttime = localdate now atstartofday val endtime = localdatetime now val stepsrequest = datatype stepstype total requestbuilder setlocaltimefilterwithgroup localtimefilter companion of starttime, endtime , localtimegroup of localtimegroupunit hourly, 1 build try { val readresult = healthdatastore aggregatedata stepsrequest val stepcount = readresult datalist first value log i mainactivity app_tag, "step count $stepcount" } catch e exception { e printstacktrace } } 9 implementing and testing app accessing the health data is required by the app to test to ensure the functionality works properly for detailed information on accessing health data, refer to accessing health data 10 partner request before distributing your app the developer mode of samsung health data sdk is a feature provided only for development purposes to ensure that an app that`s using samsung health data sdk functions properly without enabling developer mode, you need to submit a partner request through the developer site before distributing your app on app market places after partner app approval, the app's detailed information will be registered in samsung's system accessing health data steps samsung health measures step data from smartphones with samsung health installed and from connected galaxy wearable devices, such as the galaxy watch, galaxy fit, or galaxy ring it aggregates and eliminates duplicate data to provide daily step counts step count data is read-only the corresponding steps data types in samsung health sdk for android and samsung health data sdk are as following samsung health sdk for android samsung health data sdk healthconstants stepdailytrend read-only healthconstants stepcount read-only stepstype read-only here is an example of code that reads today's total step count when using samsung health sdk for android reading today's total steps with samsung health sdk for android fun readtodaystepcountdata healthdatastore healthdatastore { val starttime = localdate now atstartofday toinstant zoneoffset utc toepochmilli val filter = filter and filter eq stepdailytrend day_time, starttime , filter eq stepdailytrend source_type, stepdailytrend source_type_all val healthdataresolver = healthdataresolver healthdatastore, null val request = healthdataresolver readrequest builder setdatatype stepdailytrend health_data_type setfilter filter build try { healthdataresolver read request setresultlistener { result -> try { val iterator = result iterator if iterator hasnext { val healthdata = iterator next val totalcount = healthdata getint stepdailytrend count log i mainactivity app_tag, "today steps count $totalcount" } else { log i mainactivity app_tag, "no step data available" the code to retrieve today's total step count when using samsung health data sdk is as follows reading today's total steps with samsung health data sdk suspend fun readtodaystepcountdata healthdatastore healthdatastore { val starttime = localdate now atstartofday val endtime = localdatetime now val readrequest = datatype stepstype total requestbuilder setlocaltimefilter localtimefilter of starttime, endtime build try { val readresult = healthdatastore aggregatedata readrequest val data = readresult datalist first val totalcount = data value log i mainactivity app_tag, "today steps count $totalcount" } catch e exception { e printstacktrace } } exercise the samsung health app records the user's exercise data when the user wears a galaxy watch, galaxy fit, or galaxy ring and records exercise data, the app records their heart rate, exercise speed, and distance the corresponding exercise data types in samsung health sdk for android and samsung health data sdk are as following samsung health sdk for android samsung health data sdk healthconstants exercise exercisetype example code for reading today's exercise data when using samsung health sdk for android is as follows reading exercise data with samsung health sdk for android fun readtodayexercise healthdatastore healthdatastore { val starttime = localdate now atstartofday toinstant zoneoffset utc toepochmilli val endtime = localdate now plusdays 1 atstartofday toinstant zoneoffset utc toepochmilli val healthdataresolver = healthdataresolver healthdatastore, null val readrequest = healthdataresolver readrequest builder setdatatype exercise health_data_type setlocaltimerange floorsclimbed start_time, floorsclimbed time_offset, starttime, endtime build try { healthdataresolver read readrequest setresultlistener { result -> try { val iterator = result iterator iterator foreach { healthdata -> val exercisetype = healthdata getint exercise exercise_type val duration = healthdata getlong exercise duration val calories = healthdata getfloat exercise calorie log i mainactivity app_tag, "exercise type $exercisetype, duration $duration, calories $calories" } } finally { result close } } } catch exception exception { exception message? let { log i mainactivity app_tag, it } } } example code for reading today's exercise data when using samsung health data sdk is as follows reading exercise data with samsung health data sdk suspend fun readtodayexercise healthdatastore healthdatastore { val starttime = localdate now atstartofday val endtime = localdatetime now val readrequest = datatypes exercise readdatarequestbuilder setlocaltimefilter localtimefilter of starttime, endtime build try { val readresult = healthdatastore readdata readrequest val datapoints = readresult datalist if datapoints isempty { log i mainactivity app_tag, "no exercises today" return } datapoints foreach { datapoint -> val exercisetype = datapoint getvalue datatype exercisetype exercise_type val sessions = datapoint getvalue datatype exercisetype sessions sessions? foreach { session -> val exercisesessiontype = session exercisetype val exercisesessionduration = session duration val exercisesessioncalories = session calories log i mainactivity app_tag, "exercise type $exercisetype, session type $exercisesessiontype, duration $exercisesessionduration, calories $exercisesessioncalories" } } } catch e exception { e printstacktrace } } example code for writing exercise data when using samsung health sdk for android is as follows writing running exercise data with samsung health sdk for android fun insertrunningexercise healthdatastore healthdatastore { val fiveminutesasseconds = 300l val exercisetype = 1002 val calories = 73f val distance = 1000f val deviceid = healthdevicemanager healthdatastore localdevice uuid val starttime = instant now minusseconds fiveminutesasseconds val endtime = instant now val timeoffset = timezone getdefault getoffset endtime toepochmilli tolong val duration = duration between starttime, endtime val healthdataresolver = healthdataresolver healthdatastore, null val livedata = createlivedata listof exerciselivedata start_time = starttime toepochmilli , heart_rate = 144f, speed = 1 6f , exerciselivedata start_time = starttime plusseconds 30 toepochmilli , heart_rate = 146f, speed = 1 8f , exerciselivedata start_time = starttime plusseconds 60 toepochmilli , heart_rate = 146f, speed = 1 9f , exerciselivedata start_time = starttime plusseconds 90 toepochmilli , heart_rate = 152f, speed = 2f , exerciselivedata start_time = starttime plusseconds 120 toepochmilli , heart_rate = 154f, speed = 2 1f , exerciselivedata start_time = starttime plusseconds 150 toepochmilli , heart_rate = 161f, speed = 2 2f , exerciselivedata start_time = starttime plusseconds 180 toepochmilli , heart_rate = 159f, speed = 2 1f , exerciselivedata start_time = starttime plusseconds 210 toepochmilli , heart_rate = 160f, speed = 2 2f , exerciselivedata start_time = starttime plusseconds 240 toepochmilli , heart_rate = 159f, speed = 2 1f , exerciselivedata start_time = starttime plusseconds 270 toepochmilli , heart_rate = 161f, speed = 2 2f , exerciselivedata start_time = starttime plusseconds 300 toepochmilli , heart_rate = 160f, speed = 2f val healthdata = healthdata apply { sourcedevice = deviceid putlong exercise start_time, starttime toepochmilli putlong exercise end_time, endtime toepochmilli putlong exercise time_offset, timeoffset putint exercise exercise_type, exercisetype putlong exercise duration, duration tomillis putfloat exercise calorie, calories putfloat exercise distance, distance putblob exercise live_data, livedata } val insertrequest = healthdataresolver insertrequest builder setdatatype exercise health_data_type build insertrequest addhealthdata healthdata try { val result = healthdataresolver insert insertrequest await if result status == status_successful { log i mainactivity app_tag, "inserted running exercise count of data ${result count}" } else { log i mainactivity app_tag, "inserting failed" } } catch e exception { e printstacktrace } } private fun createlivedata livedatalist list<exerciselivedata> bytearray { val zip = healthdatautil getjsonblob livedatalist return zip } data class exerciselivedata val start_time long, val heart_rate float, val speed float example code for writing exercise data when using samsung health data sdk is as follows one exercise session of exercise data is writable writing running exercise data with samsung health data sdk suspend fun insertrunningexercise healthdatastore healthdatastore { val fiveminutesasseconds = 300l val calories = 73f val distance = 1000f val starttime = instant now minusseconds fiveminutesasseconds val endtime = instant now val duration = duration between starttime, endtime val exerciselog = listof exerciselog of timestamp = starttime, heartrate = 144f, speed = 1 6f, cadence = null, count = null, power = null , exerciselog of timestamp = starttime plusseconds 30 , heartrate = 146f, speed = 1 8f, cadence = null, count = null, power = null , exerciselog of timestamp = starttime plusseconds 60 , heartrate = 146f, speed = 1 9f, cadence = null, count = null, power = null , exerciselog of timestamp = starttime plusseconds 90 , heartrate = 152f, speed = 2f, cadence = null, count = null, power = null , exerciselog of timestamp = starttime plusseconds 120 , heartrate = 154f, speed = 2 1f, cadence = null, count = null, power = null , exerciselog of timestamp = starttime plusseconds 150 , heartrate = 161f, speed = 2 2f, cadence = null, count = null, power = null , exerciselog of timestamp = starttime plusseconds 180 , heartrate = 159f, speed = 2 1f, cadence = null, count = null, power = null , exerciselog of timestamp = starttime plusseconds 210 , heartrate = 160f, speed = 2 2f, cadence = null, count = null, power = null , exerciselog of timestamp = starttime plusseconds 240 , heartrate = 159f, speed = 2 1f, cadence = null, count = null, power = null , exerciselog of timestamp = starttime plusseconds 270 , heartrate = 161f, speed = 2 2f, cadence = null, count = null, power = null , exerciselog of timestamp = starttime plusseconds 300 , heartrate = 160f, speed = 2f, cadence = null, count = null, power = null try { val session = exercisesession builder setstarttime starttime setendtime endtime setexercisetype datatype exercisetype predefinedexercisetype running setduration duration setcalories calories setdistance distance setlog exerciselog build val healthdatapoint = healthdatapoint builder setstarttime starttime setendtime endtime addfielddata datatype exercisetype exercise_type, datatype exercisetype predefinedexercisetype running addfielddata datatype exercisetype sessions, listof session build val insertrequest = datatypes exercise insertdatarequestbuilder adddata healthdatapoint build healthdatastore insertdata insertrequest log i mainactivity app_tag, "inserted running exercise" } catch e exception { e printstacktrace } } floors climbed floors climbed data is one of the activity health data types it is displayed in the activity tracker in the samsung health app the corresponding floors climbed data types in samsung health sdk for android and samsung health data sdk are as following samsung health sdk for android samsung health data sdk healthconstants floorsclimbed floorsclimbedtype to read today's floors climbed data when using samsung health sdk for android, the following example code can be used reading floors climbed data with samsung health sdk for android fun readtodayfloorsclimbed healthdatastore healthdatastore { val starttime = localdate now atstartofday toinstant zoneoffset utc toepochmilli val endtime = localdate now plusdays 1 atstartofday toinstant zoneoffset utc toepochmilli val healthdataresolver = healthdataresolver healthdatastore, null val readrequest = healthdataresolver readrequest builder setdatatype floorsclimbed health_data_type setlocaltimerange floorsclimbed start_time, floorsclimbed time_offset, starttime, endtime build try { healthdataresolver read readrequest setresultlistener { result -> try { val iterator = result iterator if iterator hasnext { val healthdata = iterator next val totalcount = healthdata getfloat floorsclimbed floor log i mainactivity app_tag, "today floors climbed $totalcount" } else { log i mainactivity app_tag, "today floors climbed 0" } } finally { result close } } } catch exception exception { exception message? let { log i mainactivity app_tag, it } } } when using samsung health data sdk to read today's floors climbed data is as follows reading floors climbed data with samsung health data sdk suspend fun readtodayfloorsclimbed healthdatastore healthdatastore { val starttime = localdate now atstartofday val endtime = localdatetime now val readrequest = datatype floorsclimbedtype total requestbuilder setlocaltimefilter localtimefilter of starttime, endtime build try { val readresult = healthdatastore aggregatedata readrequest val data = readresult datalist val totalcount = if data isnotempty data first value else 0 log i mainactivity app_tag, "today floors climbed $totalcount" } catch e exception { e printstacktrace } } to write floors climbed data when using samsung health sdk for android, the following example code can be used writing floors climbed data with samsung health sdk for android fun inserttodayfloorsclimbed healthdatastore healthdatastore { val oneminuteasseconds = 60l val floor = 2f val deviceid = healthdevicemanager healthdatastore localdevice uuid val starttime = instant now minusseconds oneminuteasseconds toepochmilli val endtime = instant now toepochmilli val timeoffset = timezone getdefault getoffset endtime tolong val healthdataresolver = healthdataresolver healthdatastore, null val healthdata = healthdata apply { sourcedevice = deviceid putlong floorsclimbed start_time, starttime putlong floorsclimbed end_time, endtime putlong floorsclimbed time_offset, timeoffset putfloat floorsclimbed floor, floor } val insertrequest = healthdataresolver insertrequest builder setdatatype floorsclimbed health_data_type build insertrequest addhealthdata healthdata try { val result = healthdataresolver insert insertrequest await if result status == status_successful { log i mainactivity app_tag, "inserted floor climbed count of data ${result count}" } else { log i mainactivity app_tag, "inserting failed" } } catch e exception { e printstacktrace } } when using samsung health data sdk to write today's floors climbed data is as follows writing floors climbed data with samsung health data sdk suspend fun inserttodayfloorclimbed healthdatastore healthdatastore { val oneminuteasseconds = 60l val floor = 2f val starttime = instant now minusseconds oneminuteasseconds val endtime = instant now try { val healthdatapoint = healthdatapoint builder setstarttime starttime setendtime endtime addfielddata datatype floorsclimbedtype floor, floor build val insertrequest = datatypes floors_climbed insertdatarequestbuilder adddata healthdatapoint build healthdatastore insertdata insertrequest log i mainactivity app_tag, "inserted floor climbed" } catch e exception { e printstacktrace } } nutrition the samsung health app provides a food tracker that allows users to record and manage their eating data for each meal type, such as breakfast, lunch, and dinner the corresponding nutrition data types in samsung health sdk for android and samsung health data sdk are as following samsung health sdk for android samsung health data sdk healthconstants nutrition nutritiontype here is an example code to read today's nutrition data when using samsung health sdk for android reading nutrition data with samsung health sdk for android fun readtodaynutrition healthdatastore healthdatastore { val starttime = localdate now atstartofday toinstant zoneoffset utc toepochmilli val endtime = localdate now plusdays 1 atstartofday toinstant zoneoffset utc toepochmilli val healthdataresolver = healthdataresolver healthdatastore, null val nutritionrequest = healthdataresolver readrequest builder setdatatype nutrition health_data_type setlocaltimerange nutrition start_time, nutrition time_offset, starttime, endtime build try { healthdataresolver read nutritionrequest setresultlistener { result -> try { val iterator = result iterator iterator foreach { healthdata -> val title = healthdata getstring nutrition title val mealtype = healthdata getint nutrition meal_type val calories = healthdata getfloat nutrition calorie log i mainactivity app_tag, "today nutrition $title, $mealtype, $calories" } } finally { result close } } } catch exception exception { exception message? let { log i mainactivity app_tag, it } } } when using samsung health data sdk to read today's nutrition data is as follows reading nutrition data with samsung health data sdk suspend fun readtodaynutrition healthdatastore healthdatastore { val starttime = localdate now atstartofday val endtime = localdatetime now val readrequest = datatypes nutrition readdatarequestbuilder setlocaltimefilter localtimefilter of starttime, endtime build try { val readresult = healthdatastore readdata readrequest if readresult datalist isempty { log i mainactivity app_tag, "no nutrition today" return } readresult datalist foreach { healthdata -> val title = healthdata getvalue datatype nutritiontype title val mealtype = healthdata getvalue datatype nutritiontype meal_type val calories = healthdata getvalue datatype nutritiontype calories log i mainactivity app_tag, "today nutrition $title, $mealtype, $calories" } } catch e exception { e printstacktrace } } here is an example code to write nutrition data when using samsung health sdk for android writing nutrition data with samsung health sdk for android fun insertnutrition healthdatastore healthdatastore { val mydevice = healthdevicemanager healthdatastore val mealtitle = "toast and coffee" val calories = 66f val totalfat = 0 8f val saturatedfat = 0 1f val protein = 2 1f val carbohydrate = 11 9f val totalsugars = 1f val dietaryfiber = 0 6f val sodium = 135f val calcium = 40 3f val iron = 0 78f val potassium = 140f //for females, age 19 - 50, according to https //nap nationalacademies org/catalog/11537/dietary-reference-intakes-the-essential-guide-to-nutrient-requirements val referenceindexforironinmilligrams = 8 1f // for age 19-50, refer to the link above val referenceindexforcalciuminmilligrams = 1000f val starttime = instant now toepochmilli val timeoffset = timezone getdefault getoffset starttime tolong val data = healthdata apply { sourcedevice = mydevice localdevice uuid putlong healthconstants nutrition start_time, starttime ; putlong healthconstants nutrition time_offset, timeoffset ; putint healthconstants nutrition meal_type, meal_type_breakfast putstring healthconstants nutrition title, mealtitle putfloat healthconstants nutrition calorie, calories putfloat healthconstants nutrition total_fat, totalfat putfloat healthconstants nutrition saturated_fat, saturatedfat putfloat healthconstants nutrition protein, protein putfloat healthconstants nutrition carbohydrate, carbohydrate putfloat healthconstants nutrition sugar, totalsugars putfloat healthconstants nutrition dietary_fiber, dietaryfiber putfloat healthconstants nutrition sodium, sodium putfloat healthconstants nutrition potassium, potassium val calciumaspercentofreferenceintake = calcium / referenceindexforcalciuminmilligrams * 100 val ironinpercentofreferenceintake= iron / referenceindexforironinmilligrams * 100 putfloat healthconstants nutrition calcium, calciumaspercentofreferenceintake putfloat healthconstants nutrition iron, ironinpercentofreferenceintake } val insertrequest = healthdataresolver insertrequest builder setdatatype healthconstants nutrition health_data_type build val handler = handler looper getmainlooper val healthdataresolver = healthdataresolver healthdatastore, handler try { insertrequest addhealthdata data val insertresult = healthdataresolver insert insertrequest await log i tag, "insertnutrition status ${insertresult status}" } catch e exception { e printstacktrace } } when using samsung health data sdk to write nutrition data is as follows writing nutrition data with samsung health data sdk suspend fun insertnutrition healthdatastore healthdatastore { val starttime = localdatetime now val mealtitle = "toast and coffee" val calories = 66f val totalfat = 0 8f val saturatedfat = 0 1f val protein = 2 1f val carbohydrate = 11 9f val sugar = 1f val dietaryfiber = 0 6f val sodium = 135f val calcium = 40 3f val iron = 0 78f val potassium = 140f try { val healthdatapoint = healthdatapoint builder setlocalstarttime starttime addfielddata datatype nutritiontype meal_type, mealtype breakfast addfielddata datatype nutritiontype title, mealtitle addfielddata datatype nutritiontype calories, calories addfielddata datatype nutritiontype total_fat, totalfat addfielddata datatype nutritiontype saturated_fat, saturatedfat addfielddata datatype nutritiontype protein, protein addfielddata datatype nutritiontype carbohydrate, carbohydrate addfielddata datatype nutritiontype sugar, sugar addfielddata datatype nutritiontype dietary_fiber, dietaryfiber addfielddata datatype nutritiontype sodium, sodium addfielddata datatype nutritiontype calcium, calcium addfielddata datatype nutritiontype iron, iron addfielddata datatype nutritiontype potassium, potassium build val insertdatarequest = datatypes nutrition insertdatarequestbuilder adddata healthdatapoint build healthdatastore insertdata insertdatarequest } catch e exception { e printstacktrace } } water intake the data types of samsung health sdk for android and samsung health data sdk are as follows samsung health sdk for android samsung health data sdk healthconstants waterintake waterintaketype example code for reading today's water intake data when using samsung health sdk for android is as follows reading water intake data with samsung health sdk for android fun readtodaytotalwaterintake healthdatastore healthdatastore { val starttime = localdate now atstartofday toinstant zoneoffset utc toepochmilli val endtime = localdatetime now toinstant zoneoffset utc toepochmilli val handler = handler looper getmainlooper val healthdataresolver = healthdataresolver healthdatastore, handler val waterintakeid = "water_intake_sum" val aggregaterequest = healthdataresolver aggregaterequest builder addfunction healthdataresolver aggregaterequest aggregatefunction sum, healthconstants waterintake amount, waterintakeid setlocaltimerange healthconstants waterintake start_time, healthconstants waterintake time_offset, starttime, endtime setdatatype healthconstants waterintake health_data_type build try { healthdataresolver aggregate aggregaterequest setresultlistener { result -> try { result? foreach { healthdata -> val waterintakesum = healthdata getfloat waterintakeid } } finally { result close } } } catch e exception { e printstacktrace } } when using samsung health data sdk to read today's water intake data is as follows reading water intake data with samsung health data sdk suspend fun readtodaytotalwaterintake healthdatastore com samsung android sdk health data healthdatastore { val starttime = localdate now atstartofday val endtime = localdatetime now val localtimefilter = localtimefilter of starttime, endtime val readrequest = datatype waterintaketype total requestbuilder setlocaltimefilter localtimefilter build try { val result = healthdatastore aggregatedata readrequest result datalist lastornull ? let { datapoint -> val waterintake = datapoint value } } catch e exception { e printstacktrace } } example code for writing water intake data when using samsung health sdk for android is as follows writing water intake data with samsung health sdk for android fun insertwaterintake healthdatastore healthdatastore { val mydevice = healthdevicemanager healthdatastore val wateramountinmilliliters = 250f val unitamount = 250f val starttime = instant now toepochmilli val timeoffset = timezone getdefault getoffset starttime tolong val data = healthdata apply { sourcedevice = mydevice localdevice uuid putlong healthconstants waterintake start_time, starttime ; putlong healthconstants waterintake time_offset, timeoffset ; putfloat healthconstants waterintake amount, wateramountinmilliliters putfloat healthconstants waterintake unit_amount, unitamount } val insertrequest = healthdataresolver insertrequest builder setdatatype healthconstants waterintake health_data_type build val handler = handler looper getmainlooper val healthdataresolver = healthdataresolver healthdatastore, handler try { insertrequest addhealthdata data val insertresult = healthdataresolver insert insertrequest await log i tag, "insertwaterintake status ${insertresult status}" } catch e exception { e printstacktrace } } when using samsung health data sdk to write water intake data is as follows writing water intake data with samsung health data sdk suspend fun insertwaterintake healthdatastore healthdatastore { val starttime = localdatetime now val wateramountinmilliliters = 250f try { val healthdatapoint = healthdatapoint builder setlocalstarttime starttime addfielddata datatype waterintaketype amount, wateramountinmilliliters build val insertdatarequest = datatypes water_intake insertdatarequestbuilder adddata healthdatapoint build healthdatastore insertdata insertdatarequest } catch e exception { e printstacktrace } } sleep and sleep stage the data types of samsung health sdk for android and samsung health data sdk are as follows samsung health sdk for android samsung health data sdk healthconstants sleep healthconstants sleepstage sleeptype code for reading the last night's sleep data when using samsung health sdk for android is as follows reading the last night's sleep data with samsung health sdk for android fun readlastsleep healthdatastore healthdatastore { val handler = handler looper getmainlooper val healthdataresolver = healthdataresolver healthdatastore, handler val resultcount = 1 val resultoffset = 0 val request healthdataresolver readrequest = healthdataresolver readrequest builder setdatatype healthconstants sleep health_data_type setsort healthconstants sleep start_time, sortorder desc setresultcount resultoffset, resultcount build try { healthdataresolver read request setresultlistener { result -> try { result lastornull ? let { healthdata -> val sleepid = healthdata getstring healthconstants sleep uuid val sleepstarttime = instant ofepochmilli healthdata getlong healthconstants sleep start_time val sleependtime = instant ofepochmilli healthdata getlong healthconstants sleep end_time readsleepstagesforsleepid healthdatastore, sleepid } } finally { result close } } } catch e exception { e printstacktrace } } fun readsleepstagesforsleepid healthdatastore healthdatastore, sleepid string { val handler = handler looper getmainlooper val healthdataresolver = healthdataresolver healthdatastore, handler val request healthdataresolver readrequest = healthdataresolver readrequest builder setdatatype healthconstants sleepstage health_data_type setfilter filter eq healthconstants sleepstage sleep_id, sleepid build try { healthdataresolver read request setresultlistener { result -> try { result? foreach { sleepstagedata -> val sleepstagename = sleepstagenamebyid sleepstagedata getint healthconstants sleepstage stage val sleepstagestarttime = instant ofepochmilli sleepstagedata getlong healthconstants sleepstage start_time val sleepstageendtime = instant ofepochmilli sleepstagedata getlong healthconstants sleepstage end_time } } finally { result close } } } catch e exception { e printstacktrace } } fun sleepstagenamebyid id int string { return when id { healthconstants sleepstage stage_awake -> "awake" healthconstants sleepstage stage_deep -> "deep" healthconstants sleepstage stage_light -> "light" healthconstants sleepstage stage_rem -> "rem" else -> "" } } when using samsung health data sdk to read the last night's sleep data is as follows reading the last night's sleep data with samsung health data sdk suspend fun readsleeptotalduration healthdatastore healthdatastore { val daysbackoffset = 400l val starttime = localdate now minusdays daysbackoffset val endtime = localdate now val localdatefilter = localdatefilter of starttime, endtime val request = datatype sleeptype total_duration requestbuilder setlocaldatefilter localdatefilter build try { val result = healthdatastore aggregatedata request result datalist foreach { aggregateddata -> val starttime = aggregateddata starttime val endtime = aggregateddata endtime val totalduration = aggregateddata value } } catch e exception { e printstacktrace } } suspend fun readlastsleep healthdatastore healthdatastore { val resultcount = 1 val readrequest = datatypes sleep readdatarequestbuilder setordering ordering desc setlimit resultcount build try { val result = healthdatastore readdata readrequest result datalist lastornull ? let { sleepdata -> val sleepid = sleepdata uid val sleepstarttime = sleepdata starttime val sleependtime = sleepdata endtime val sleepsessions = sleepdata getvalue datatype sleeptype sessions sleepsessions? foreach { sleepsession -> val sessionduration = sleepsession duration val sessionstarttime = sleepsession starttime val sessionendtime = sleepsession endtime val sleepstages = sleepsession stages sleepstages? foreach { sleepstage -> val sleepstagename = sleepstage stage name val sleepstagestarttime = sleepstage starttime val sleepstageendtime = sleepstage endtime } } } } catch e exception { e printstacktrace } } code for writing sleep data when using samsung health sdk for android is as follows writing the last night's sleep data with samsung health sdk for android fun insertsleepdata healthdatastore healthdatastore { val handler = handler looper getmainlooper val healthdataresolver = healthdataresolver healthdatastore, handler val healthdevicemanager = healthdevicemanager healthdatastore val zoneoffset = zoneoffset systemdefault rules getoffset instant now val starttime = localdate now minusdays 1 attime 23, 10 toinstant zoneoffset val endtime = localdate now attime 6, 30 toinstant zoneoffset val timeoffset = timezone getdefault getoffset instant now toepochmilli val sleepdata = healthdata apply { sourcedevice = healthdevicemanager localdevice uuid putlong healthconstants sleep start_time, starttime toepochmilli putlong healthconstants sleep end_time, endtime toepochmilli putlong healthconstants sleep time_offset, timeoffset tolong } val insertrequest = insertrequest builder setdatatype healthconstants sleep health_data_type build insertrequest addhealthdata sleepdata try { val insertresult = healthdataresolver insert insertrequest await if insertresult status != baseresult status_successful { log i mainactivity app_tag, "error inserting sleep data error code ${insertresult status}" } } catch e exception { e printstacktrace } val resultcount = 1 val resultoffset = 0 val readrequest = healthdataresolver readrequest builder setdatatype healthconstants sleep health_data_type setsort healthconstants sleep update_time, sortorder desc setresultcount resultoffset, resultcount build try { val readresult = healthdataresolver read readrequest await val sleepid = readresult last getstring healthconstants sleep uuid writesleepstages healthdatastore, sleepid } catch e exception { e printstacktrace } } private fun writesleepstages healthdatastore healthdatastore, sleepid string { val handler = handler looper getmainlooper val healthdataresolver = healthdataresolver healthdatastore, handler val healthdevicemanager = healthdevicemanager healthdatastore val startdate = localdate now minusdays 1 val enddate = localdate now val zoneoffset = zoneoffset systemdefault rules getoffset instant now val timeoffset = timezone getdefault getoffset instant now toepochmilli val sleepstages = mutablelistof<healthdata> var sleepstage = healthdata apply { sourcedevice = healthdevicemanager localdevice uuid putlong healthconstants sleepstage time_offset, timeoffset tolong putstring healthconstants sleepstage sleep_id, sleepid putlong healthconstants sleepstage start_time, startdate attime 23, 10 toinstant zoneoffset toepochmilli putlong healthconstants sleepstage end_time, startdate attime 23, 35 toinstant zoneoffset toepochmilli putint healthconstants sleepstage stage, healthconstants sleepstage stage_light } sleepstages add sleepstage sleepstage = healthdata apply { sourcedevice = healthdevicemanager localdevice uuid putlong healthconstants sleepstage time_offset, timeoffset tolong putstring healthconstants sleepstage sleep_id, sleepid putlong healthconstants sleepstage start_time, startdate attime 23, 35 toinstant zoneoffset toepochmilli putlong healthconstants sleepstage end_time, enddate attime 1, 50 toinstant zoneoffset toepochmilli putint healthconstants sleepstage stage, healthconstants sleepstage stage_deep } sleepstages add sleepstage sleepstage = healthdata apply { sourcedevice = healthdevicemanager localdevice uuid putlong healthconstants sleepstage time_offset, timeoffset tolong putstring healthconstants sleepstage sleep_id, sleepid putlong healthconstants sleepstage start_time, enddate attime 1, 50 toinstant zoneoffset toepochmilli putlong healthconstants sleepstage end_time, enddate attime 2, 20 toinstant zoneoffset toepochmilli putint healthconstants sleepstage stage, healthconstants sleepstage stage_rem } sleepstages add sleepstage sleepstage = healthdata apply { sourcedevice = healthdevicemanager localdevice uuid putlong healthconstants sleepstage time_offset, timeoffset tolong putstring healthconstants sleepstage sleep_id, sleepid putlong healthconstants sleepstage start_time, enddate attime 2, 20 toinstant zoneoffset toepochmilli putlong healthconstants sleepstage end_time, enddate attime 2, 55 toinstant zoneoffset toepochmilli putint healthconstants sleepstage stage, healthconstants sleepstage stage_light } sleepstages add sleepstage sleepstage = healthdata apply { sourcedevice = healthdevicemanager localdevice uuid putlong healthconstants sleepstage time_offset, timeoffset tolong putstring healthconstants sleepstage sleep_id, sleepid putlong healthconstants sleepstage start_time, enddate attime 2, 55 toinstant zoneoffset toepochmilli putlong healthconstants sleepstage end_time, enddate attime 3, 10 toinstant zoneoffset toepochmilli putint healthconstants sleepstage stage, healthconstants sleepstage stage_awake } sleepstages add sleepstage sleepstage = healthdata apply { sourcedevice = healthdevicemanager localdevice uuid putlong healthconstants sleepstage time_offset, timeoffset tolong putstring healthconstants sleepstage sleep_id, sleepid putlong healthconstants sleepstage start_time, enddate attime 3, 10 toinstant zoneoffset toepochmilli putlong healthconstants sleepstage end_time, enddate attime 4, 30 toinstant zoneoffset toepochmilli putint healthconstants sleepstage stage, healthconstants sleepstage stage_deep } sleepstages add sleepstage sleepstage = healthdata apply { sourcedevice = healthdevicemanager localdevice uuid putlong healthconstants sleepstage time_offset, timeoffset tolong putstring healthconstants sleepstage sleep_id, sleepid putlong healthconstants sleepstage start_time, enddate attime 4, 30 toinstant zoneoffset toepochmilli putlong healthconstants sleepstage end_time, enddate attime 5, 10 toinstant zoneoffset toepochmilli putint healthconstants sleepstage stage, healthconstants sleepstage stage_rem } sleepstages add sleepstage sleepstage = healthdata apply { sourcedevice = healthdevicemanager localdevice uuid putlong healthconstants sleepstage time_offset, timeoffset tolong putstring healthconstants sleepstage sleep_id, sleepid putlong healthconstants sleepstage start_time, enddate attime 5, 10 toinstant zoneoffset toepochmilli putlong healthconstants sleepstage end_time, enddate attime 6, 20 toinstant zoneoffset toepochmilli putint healthconstants sleepstage stage, healthconstants sleepstage stage_light } sleepstages add sleepstage sleepstage = healthdata apply { sourcedevice = healthdevicemanager localdevice uuid putlong healthconstants sleepstage time_offset, timeoffset tolong putstring healthconstants sleepstage sleep_id, sleepid putlong healthconstants sleepstage start_time, enddate attime 6, 20 toinstant zoneoffset toepochmilli putlong healthconstants sleepstage end_time, enddate attime 6, 30 toinstant zoneoffset toepochmilli putint healthconstants sleepstage stage, healthconstants sleepstage stage_awake } sleepstages add sleepstage val insertrequest = insertrequest builder setdatatype healthconstants sleepstage health_data_type build insertrequest addhealthdata sleepstages try { val insertresult = healthdataresolver insert insertrequest await if insertresult status != baseresult status_successful { log i mainactivity app_tag, "error inserting stages data error code ${insertresult status}" } } catch e exception { e printstacktrace } } when using samsung health data sdk to write sleep data is as follows writing the last night's sleep data with samsung health data sdk suspend fun insertsleepdata healthdatastore healthdatastore { val startdate = localdate now minusdays 1 val enddate = localdate now val starttime = startdate attime 23, 10 val endtime = enddate attime 6, 30 val zoneoffset = zoneoffset systemdefault rules getoffset instant now val duration = duration between starttime, endtime val sleepstagelist = listof sleepsession sleepstage of startdate attime 23, 10 toinstant zoneoffset , startdate attime 23, 35 toinstant zoneoffset , datatype sleeptype stagetype light , sleepsession sleepstage of startdate attime 23, 35 toinstant zoneoffset , enddate attime 1, 50 toinstant zoneoffset , datatype sleeptype stagetype deep , sleepsession sleepstage of enddate attime 1, 50 toinstant zoneoffset , enddate attime 2, 20 toinstant zoneoffset , datatype sleeptype stagetype rem , sleepsession sleepstage of enddate attime 2, 20 toinstant zoneoffset , enddate attime 2, 55 toinstant zoneoffset , datatype sleeptype stagetype light , sleepsession sleepstage of enddate attime 2, 55 toinstant zoneoffset , enddate attime 3, 10 toinstant zoneoffset , datatype sleeptype stagetype awake , sleepsession sleepstage of enddate attime 3, 10 toinstant zoneoffset , enddate attime 4, 30 toinstant zoneoffset , datatype sleeptype stagetype deep , sleepsession sleepstage of enddate attime 4, 30 toinstant zoneoffset , enddate attime 5, 10 toinstant zoneoffset , datatype sleeptype stagetype rem , sleepsession sleepstage of enddate attime 5, 10 toinstant zoneoffset , enddate attime 6, 20 toinstant zoneoffset , datatype sleeptype stagetype light , sleepsession sleepstage of enddate attime 6, 20 toinstant zoneoffset , enddate attime 6, 30 toinstant zoneoffset , datatype sleeptype stagetype awake val sleepsession = sleepsession of starttime toinstant zoneoffset , endtime toinstant zoneoffset , duration, sleepstagelist try { val healthdatapoint = healthdatapoint builder setlocalstarttime starttime setlocalendtime endtime addfielddata datatype sleeptype duration, duration addfielddata datatype sleeptype sessions, listof sleepsession build val insertdatarequest = datatypes sleep insertdatarequestbuilder adddata healthdatapoint build healthdatastore insertdata insertdatarequest } catch e exception { e printstacktrace } } weight the corresponding weight data types in samsung health sdk for android and samsung health data sdk are as following samsung health sdk for android samsung health data sdk healthconstants weight bodycompositiontype to read the latest weight data when using samsung health sdk for android, the following example code can be used reading the last weight data with samsung health sdk for android fun readlatestweight healthdatastore healthdatastore { val resultcount = 1 val resultoffset = 0 val handler = handler looper getmainlooper val healthdataresolver = healthdataresolver healthdatastore, handler val request healthdataresolver readrequest = healthdataresolver readrequest builder setdatatype healthconstants weight health_data_type setsort healthconstants oxygensaturation start_time, sortorder desc setresultcount resultoffset, resultcount build try { healthdataresolver read request setresultlistener { result -> try { result lastornull ? let { healthdata -> val measurementstarttime = instant ofepochmilli healthdata getlong healthconstants weight start_time val weight = healthdata getfloat healthconstants weight weight val bodyfat = healthdata getfloat healthconstants weight body_fat } } finally { result close } } } catch e exception { e printstacktrace } } when using samsung health data sdk to read the latest weight data is as follows reading the last weight data with samsung health data sdk suspend fun readlatestweight healthdatastore healthdatastore { val resultcount = 1 val readrequest = datatypes body_composition readdatarequestbuilder setordering ordering desc setlimit resultcount build try { val result = healthdatastore readdata readrequest result datalist lastornull ? let { datapoint -> val weight = datapoint getvalue datatype bodycompositiontype weight val bodyfat = datapoint getvalue datatype bodycompositiontype body_fat val measurementstarttime = datapoint starttime } } catch e exception { e printstacktrace } } here is an example code to write weight data when using samsung health sdk for android writing weight data with samsung health sdk for android fun insertweightdata healthdatastore healthdatastore { val weight = 75f val zoneid = zoneoffset systemdefault val starttime = localdate now attime 9, 0 atzone zoneid toinstant toepochmilli val timeoffset = timezone getdefault getoffset starttime tolong val mhealthdataresolver = healthdataresolver healthdatastore, handler looper getmainlooper val healthdevicemanager = healthdevicemanager healthdatastore val data = healthdata apply { putlong healthconstants weight start_time, starttime putlong healthconstants weight time_offset, timeoffset putfloat healthconstants weight weight, weight // register local device as the source of data sourcedevice = healthdevicemanager localdevice uuid } try { val insertrequest = insertrequest builder setdatatype healthconstants weight health_data_type build insertrequest addhealthdata data val result = mhealthdataresolver insert insertrequest await log i mainactivity app_tag, "insert result status ${result status}" } catch e exception { e printstacktrace } } writing weight data with samsung health data sdk suspend fun insertweightdata healthdatastore healthdatastore { val weight = 75f val localdatetime = localdate now attime 9, 0 val zoneid = zoneoffset systemdefault val zoneoffset = zoneid rules getoffset localdatetime try { val healthdatapoint = healthdatapoint builder addfielddata datatype bodycompositiontype weight, weight setlocalstarttime localdatetime, zoneoffset build val insertrequest = datatypes body_composition insertdatarequestbuilder adddata healthdatapoint build healthdatastore insertdata insertrequest } catch e exception { e printstacktrace } } heart rate the corresponding heart rate data types in samsung health sdk for android and samsung health data sdk are as following samsung health sdk for android samsung health data sdk healthconstants heartrate heartratetype example code for reading today's heart rate data when using samsung health sdk for android is as follows reading today's heart rate data with samsung health sdk for android class readheartrate { fun readtodayheartrate healthdatastore healthdatastore { val starttime = localdate now atstartofday toinstant zoneoffset utc toepochmilli val endtime = localdatetime now toinstant zoneoffset utc toepochmilli val handler = handler looper getmainlooper val healthdataresolver = healthdataresolver healthdatastore, handler val request healthdataresolver readrequest = healthdataresolver readrequest builder setdatatype healthconstants heartrate health_data_type setlocaltimerange healthconstants heartrate start_time, healthconstants heartrate time_offset, starttime, endtime build try { healthdataresolver read request setresultlistener { result -> try { result? foreach { healthdata -> val heartrate = healthdata getfloat healthconstants heartrate heart_rate val measurementstarttime = instant ofepochmilli healthdata getlong healthconstants heartrate start_time val measurementendtime = instant ofepochmilli healthdata getlong healthconstants heartrate end_time val binningdata = healthdata getblob healthconstants heartrate binning_data val livedatalist = healthdatautil getstructureddatalist binningdata, heartratelivedata class java livedatalist foreach { livedatapoint -> val heartrate = livedatapoint heart_rate val starttime = instant ofepochmilli livedatapoint start_time } } } finally { result close } } } catch e exception { e printstacktrace } } } data class heartratelivedata val heart_rate float, val heart_rate_min float, val heart_rate_max float, val start_time long, val end_time long when using samsung health data sdk to read today's heart rate data is as follows reading today's heart rate data with samsung health data sdk suspend fun readtodayheartrate healthdatastore healthdatastore { val starttime = localdate now atstartofday val endtime = localdatetime now val localtimefilter = localtimefilter of starttime, endtime val readrequest = datatypes heart_rate readdatarequestbuilder setlocaltimefilter localtimefilter build try { val result = healthdatastore readdata readrequest result datalist foreach { datapoint -> val starttime = datapoint starttime val endtime = datapoint endtime val heartrate = datapoint getvalue datatype heartratetype heart_rate val heartrateseriesdata = datapoint getvalue datatype heartratetype series_data heartrateseriesdata? foreach { seriesdata -> val starttime = seriesdata starttime val heartrate = seriesdata heartrate } } } catch e exception { e printstacktrace } } to write heart rate data when using samsung health sdk for android, the following example code can be used writing heart rate data with samsung health sdk for android fun inserttodayheartrate healthdatastore healthdatastore { val tenminutesasseconds = 600l val heartrate = 76f val heartbeatcount = 1 val deviceid = healthdevicemanager healthdatastore localdevice uuid val starttime = instant now minusseconds tenminutesasseconds toepochmilli val endtime = instant now toepochmilli val timeoffset = timezone getdefault getoffset endtime tolong val healthdataresolver = healthdataresolver healthdatastore, null val healthdata = healthdata apply { sourcedevice = deviceid putlong heartrate start_time, starttime putlong heartrate end_time, endtime putlong heartrate time_offset, timeoffset putfloat heartrate heart_rate, heartrate putint heartrate heart_beat_count, heartbeatcount } val insertrequest = healthdataresolver insertrequest builder setdatatype heartrate health_data_type build insertrequest addhealthdata healthdata try { val result = healthdataresolver insert insertrequest await if result status == status_successful { log i mainactivity app_tag, "inserted heart rate count of data ${result count}" } else { log i mainactivity app_tag, "inserting failed" } } catch e exception { e printstacktrace } } when using samsung health data sdk to write heart rate data is as follows writing heart rate data with samsung health data sdk suspend fun inserttodayheartrate healthdatastore healthdatastore { val tenminutesasseconds = 600l val heartrate = 76f val starttime = localdatetime now minusseconds tenminutesasseconds val endtime = localdatetime now try { val healthdatapoint = healthdatapoint builder setlocalstarttime starttime setlocalendtime endtime addfielddata datatype heartratetype heart_rate, heartrate build val insertrequest = datatypes heart_rate insertdatarequestbuilder adddata healthdatapoint build healthdatastore insertdata insertrequest log i mainactivity app_tag, "inserted heart rate" } catch e exception { e printstacktrace } } blood glucose the corresponding blood glucose data types in samsung health sdk for android and samsung health data sdk are as following samsung health sdk for android samsung health data sdk healthconstants bloodglucose bloodglucosetype here is an example code to read today's blood glucose data when using samsung health sdk for android reading today's blood glucose data with samsung health sdk for android fun readtodaybloodglucose healthdatastore healthdatastore { val starttime = localdate now atstartofday toinstant zoneoffset utc toepochmilli val endtime = localdatetime now toinstant zoneoffset utc toepochmilli val handler = handler looper getmainlooper val healthdataresolver = healthdataresolver healthdatastore, handler val request healthdataresolver readrequest = healthdataresolver readrequest builder setdatatype healthconstants bloodglucose health_data_type setlocaltimerange healthconstants oxygensaturation start_time, healthconstants oxygensaturation time_offset, starttime, endtime build try { healthdataresolver read request setresultlistener { result -> try { result foreach { healthdata -> val measurementstarttime = instant ofepochmilli healthdata getlong healthconstants bloodglucose start_time val bloodglucose = healthdata getfloat healthconstants bloodglucose glucose //refer to the documentation for meal_type, measurement_type, sample_source_type mapping val mealtype = healthdata getint healthconstants bloodglucose meal_type val measurementtype = healthdata getint healthconstants bloodglucose measurement_type val samplesourcetype = healthdata getint healthconstants bloodglucose sample_source_type } } finally { result close } } } catch e exception { e printstacktrace } } when using samsung health data sdk to read today's blood glucose data is as follows reading today's blood glucose data with samsung health data sdk fun readtodaybloodglucose healthdatastore healthdatastore { val starttime = localdate now atstartofday toinstant zoneoffset utc toepochmilli val endtime = localdatetime now toinstant zoneoffset utc toepochmilli val handler = handler looper getmainlooper val healthdataresolver = healthdataresolver healthdatastore, handler val request healthdataresolver readrequest = healthdataresolver readrequest builder setdatatype healthconstants bloodglucose health_data_type setlocaltimerange healthconstants oxygensaturation start_time, healthconstants oxygensaturation time_offset, starttime, endtime build try { healthdataresolver read request setresultlistener { result -> try { result foreach { healthdata -> val measurementstarttime = instant ofepochmilli healthdata getlong healthconstants bloodglucose start_time val bloodglucose = healthdata getfloat healthconstants bloodglucose glucose //refer to the documentation for meal_type, measurement_type, sample_source_type mapping val mealtype = healthdata getint healthconstants bloodglucose meal_type val measurementtype = healthdata getint healthconstants bloodglucose measurement_type val samplesourcetype = healthdata getint healthconstants bloodglucose sample_source_type } } finally { result close } } } catch e exception { e printstacktrace } } code for writing sleep data when using samsung health sdk for android is as follows writing blood glucose data with samsung health sdk for android fun insertbloodglucosedata healthdatastore healthdatastore { val handler = handler looper getmainlooper val healthdataresolver = healthdataresolver healthdatastore, handler val healthdevicemanager = healthdevicemanager healthdatastore val tenminutesasseconds = 600l val starttime = instant now minusseconds tenminutesasseconds val timeoffset = timezone getdefault getoffset starttime toepochmilli val glucose = 4 8f val bloodglucosedata = healthdata apply { sourcedevice = healthdevicemanager localdevice uuid putlong healthconstants bloodpressure start_time, starttime toepochmilli putlong healthconstants bloodglucose time_offset, timeoffset tolong putfloat healthconstants bloodglucose glucose, glucose putint healthconstants bloodglucose measurement_type, healthconstants bloodglucose measurement_type_whole_blood putint healthconstants bloodglucose meal_type, healthconstants bloodglucose meal_type_fasting } val insertrequest = insertrequest builder setdatatype healthconstants bloodglucose health_data_type build insertrequest addhealthdata bloodglucosedata try { val insertresult = healthdataresolver insert insertrequest await if insertresult status != baseresult status_successful { log i mainactivity app_tag, "error inserting blood glucose data error code ${insertresult status}" } } catch e exception { e printstacktrace } } example code for writing blood glucose data when using samsung health data sdk is as follows writing blood glucose data with samsung health data sdk suspend fun insertbloodglucosedata healthdatastore healthdatastore { val starttime = localdatetime now minusminutes 10 val glucose = 4 8f try { val healthdatapoint = healthdatapoint builder setlocalstarttime starttime setlocalendtime starttime addfielddata datatype bloodglucosetype glucose_level, glucose addfielddata datatype bloodglucosetype measurement_type, datatype bloodglucosetype measurementtype whole_blood addfielddata datatype bloodglucosetype meal_status, datatype bloodglucosetype mealstatus fasting build val insertdatarequest = datatypes blood_glucose insertdatarequestbuilder adddata healthdatapoint build healthdatastore insertdata insertdatarequest } catch e exception { e printstacktrace } } blood oxygen the corresponding blood oxygen data types in samsung health sdk for android and samsung health data sdk are as following samsung health sdk for android samsung health data sdk healthconstants oxygensaturationtype bloodoxygentype example code for reading the latest blood oxygen data when using samsung health sdk for android is as follows reading the latest blood oxygen data with samsung health sdk for android fun readlatestbloodoxygen healthdatastore healthdatastore { val resultoffset = 0; val resultcount = 1 val handler = handler looper getmainlooper val healthdataresolver = healthdataresolver healthdatastore, handler val request healthdataresolver readrequest = healthdataresolver readrequest builder setdatatype healthconstants oxygensaturation health_data_type setsort healthconstants oxygensaturation start_time, sortorder desc setresultcount resultoffset, resultcount build try { healthdataresolver read request setresultlistener { result -> try { result lastornull ? let { healthdata -> val bloodoxygen = healthdata getfloat healthconstants oxygensaturation spo2 val measurementstarttime = instant ofepochmilli healthdata getlong healthconstants oxygensaturation start_time } } finally { result close } } } catch e exception { e printstacktrace } } when using samsung health data sdk to read the latest blood oxygen data is as follows reading the latest blood oxygen data with samsung health data sdk suspend fun readlatestbloodoxygen healthdatastore healthdatastore { val resultcount = 1 val readrequest = datatypes blood_oxygen readdatarequestbuilder setordering ordering desc setlimit resultcount build try { val result = healthdatastore readdata readrequest result datalist lastornull ? let { datapoint -> val bloodoxygen = datapoint getvalue datatype bloodoxygentype oxygen_saturation val measurementstarttime = datapoint starttime } } catch e exception { e printstacktrace } } here is an example code to write blood oxygen data when using samsung health sdk for android writing blood oxygen data with samsung health sdk for android fun insertbloodoxygendata healthdatastore healthdatastore { val bloodoxygen = 98f val tenminutesasseconds = 10l * 60l val zoneid = zoneoffset systemdefault val time = localdatetime now minusseconds tenminutesasseconds atzone zoneid toinstant toepochmilli val timeoffset = timezone getdefault getoffset time tolong val mhealthdataresolver = healthdataresolver healthdatastore, handler looper getmainlooper val healthdevicemanager = healthdevicemanager healthdatastore val data = healthdata apply { putlong healthconstants oxygensaturation start_time, time putlong healthconstants oxygensaturation end_time, time putlong healthconstants oxygensaturation time_offset, timeoffset putfloat healthconstants oxygensaturation spo2, bloodoxygen // register local device as the source of data sourcedevice = healthdevicemanager localdevice uuid } try { val insertrequest = insertrequest builder setdatatype healthconstants oxygensaturation health_data_type build insertrequest addhealthdata data val result = mhealthdataresolver insert insertrequest await log i mainactivity app_tag, "insert result status ${result status}" } catch e exception { e printstacktrace } } example code for writing blood oxygen data when using samsung health data sdk is as follows writing blood oxygen data with samsung health data sdk suspend fun insertbloodoxygendata healthdatastore healthdatastore { val bloodoxygen = 98f val tenminutesasseconds = 10l * 60l val time = localdatetime now minusseconds tenminutesasseconds val zoneid = zoneoffset systemdefault val zoneoffset = zoneid rules getoffset time try { val healthdatapoint = healthdatapoint builder addfielddata datatype bloodoxygentype oxygen_saturation, bloodoxygen setlocalstarttime time, zoneoffset setlocalendtime time, zoneoffset build val insertrequest = datatypes blood_oxygen insertdatarequestbuilder adddata healthdatapoint build healthdatastore insertdata insertrequest } catch e exception { e printstacktrace } } blood pressure the corresponding blood pressure data types in samsung health sdk for android and samsung health data sdk are as following samsung health sdk for android samsung health data sdk healthconstants bloodpressure bloodpressuretype code for reading the latest blood pressure data when using samsung health sdk for android is as follows reading the latest blood pressure data with samsung health sdk for android fun readlatestbloodpressure healthdatastore healthdatastore { val resultoffset = 0; val resultcount = 1 val handler = handler looper getmainlooper val healthdataresolver = healthdataresolver healthdatastore, handler val request healthdataresolver readrequest = healthdataresolver readrequest builder setdatatype healthconstants bloodpressure health_data_type setsort healthconstants bloodpressure start_time, sortorder desc setresultcount resultoffset, resultcount build try { healthdataresolver read request setresultlistener { result -> try { result? lastornull ? let { healthdata -> val starttime = instant ofepochmilli healthdata getlong healthconstants bloodpressure start_time val systolicpressure = healthdata getfloat healthconstants bloodpressure systolic val diastolicpressure = healthdata getfloat healthconstants bloodpressure diastolic val mean = healthdata getfloat healthconstants bloodpressure mean val pulse = healthdata getint healthconstants bloodpressure pulse val sourcepackagename = healthdata getstring healthconstants common package_name val sourcedeviceid = healthdata getstring healthconstants common device_uuid } } finally { result close } } } catch e exception { e printstacktrace } } when using samsung health data sdk to read the latest blood pressure data is as follows reading the latest blood pressure data with samsung health data sdk suspend fun readlatestbloodpressure healthdatastore healthdatastore { val resultcount = 1 val readrequest = datatypes blood_pressure readdatarequestbuilder setordering ordering desc setlimit resultcount build try { val result = healthdatastore readdata readrequest result datalist lastornull ? let { datapoint -> val starttime = datapoint starttime val systolicpressure = datapoint getvalue datatype bloodpressuretype systolic val diastolicpressure = datapoint getvalue datatype bloodpressuretype diastolic val mean = datapoint getvalue datatype bloodpressuretype mean val pulse = datapoint getvalue datatype bloodpressuretype pulse_rate val sourcepackagename = datapoint datasource? appid val sourcedeviceid = datapoint datasource? deviceid } } catch e exception { e printstacktrace } } code for writing blood pressure data when using samsung health sdk for android is as follows writing blood pressure data with samsung health sdk for android fun insertbloodpressuredata healthdatastore healthdatastore { val handler = handler looper getmainlooper val healthdataresolver = healthdataresolver healthdatastore, handler val healthdevicemanager = healthdevicemanager healthdatastore val tenminutesasseconds = 600l val starttime = instant now minusseconds tenminutesasseconds val timeoffset = timezone getdefault getoffset starttime toepochmilli val systolic = 119f val diastolic = 87f val mean = 0f val bloodpressuredata = healthdata apply { sourcedevice = healthdevicemanager localdevice uuid putlong healthconstants bloodpressure start_time, starttime toepochmilli putlong healthconstants bloodpressure time_offset, timeoffset tolong putfloat healthconstants bloodpressure systolic, systolic putfloat healthconstants bloodpressure diastolic, diastolic putfloat healthconstants bloodpressure mean, mean } val insertrequest = insertrequest builder setdatatype healthconstants bloodpressure health_data_type build insertrequest addhealthdata bloodpressuredata try { val insertresult = healthdataresolver insert insertrequest await if insertresult status != baseresult status_successful { log i mainactivity app_tag, "error inserting blood pressure data error code ${insertresult status}" } } catch e exception { e printstacktrace } } example code for writing blood pressure data when using samsung health data sdk is as follows writing blood pressure data with samsung health data sdk suspend fun insertbloodpressuredata healthdatastore healthdatastore { val starttime = localdatetime now minusminutes 10 val systolic = 119f val diastolic = 87f val mean = 0f try { val healthdatapoint = healthdatapoint builder setlocalstarttime starttime addfielddata datatype bloodpressuretype systolic, systolic addfielddata datatype bloodpressuretype diastolic, diastolic addfielddata datatype bloodpressuretype mean, mean build val insertdatarequest = datatypes blood_pressure insertdatarequestbuilder adddata healthdatapoint build healthdatastore insertdata insertdatarequest } catch e exception { e printstacktrace } } body temperature the corresponding body temperature data types in samsung health sdk for android and samsung health data sdk are as following samsung health sdk for android samsung health data sdk healthconstants bodytemperature bodytemperaturetype here is an example of code that reads today's body temperature data when using samsung health sdk for android reading today's body temperature data with samsung health sdk for android fun readtodaybodytemperature healthdatastore healthdatastore { val starttime = localdate now atstartofday toinstant zoneoffset utc toepochmilli val endtime = localdatetime now toinstant zoneoffset utc toepochmilli val handler = handler looper getmainlooper val healthdataresolver = healthdataresolver healthdatastore, handler val readrequest healthdataresolver readrequest = healthdataresolver readrequest builder setdatatype healthconstants bodytemperature health_data_type setlocaltimerange healthconstants bodytemperature start_time, healthconstants bodytemperature time_offset, starttime, endtime build try { healthdataresolver read readrequest setresultlistener { result -> try { result lastornull ? let { healthdata -> val measurementstarttime = date healthdata getlong healthconstants bodytemperature start_time val bodytemperature = healthdata getfloat healthconstants bodytemperature temperature } } finally { result close } } } catch e exception { e printstacktrace } } when using samsung health data sdk to read today's body temperature data is as follows reading today's body temperature samsung health data sdk suspend fun readtodaybodytemperature healthdatastore com samsung android sdk health data healthdatastore { val starttime = localdate now atstartofday val endtime = localdatetime now val localtimefilter = localtimefilter of starttime, endtime val readrequest = datatypes body_temperature readdatarequestbuilder setlocaltimefilter localtimefilter build try { val result = healthdatastore readdata readrequest result datalist lastornull ? let { datapoint -> val measurementstarttime = datapoint starttime val bodytemperature = datapoint getvalue datatype bodytemperaturetype body_temperature } } catch e exception { e printstacktrace } } example code for writing body temperature data when using samsung health sdk for android is as follows writing body temperature data with samsung health sdk for android fun insertbodytemperaturedata healthdatastore healthdatastore { val bodytemperature = 37f val tenminutesasseconds = 10l * 60l val zoneid = zoneoffset systemdefault val starttime = localdatetime now minusseconds tenminutesasseconds atzone zoneid toinstant toepochmilli val timeoffset = timezone getdefault getoffset starttime tolong val mhealthdataresolver = healthdataresolver healthdatastore, handler looper getmainlooper val healthdevicemanager = healthdevicemanager healthdatastore val data = healthdata apply { putlong healthconstants bodytemperature start_time, starttime putlong healthconstants bodytemperature time_offset, timeoffset putfloat healthconstants bodytemperature temperature, bodytemperature // register local device as the source of data sourcedevice = healthdevicemanager localdevice uuid } try { val insertrequest = insertrequest builder setdatatype healthconstants bodytemperature health_data_type build insertrequest addhealthdata data val result = mhealthdataresolver insert insertrequest await log i mainactivity app_tag, "insert result status ${result status}" } catch e exception { e printstacktrace } } when using samsung health data sdk to write body temperature data is as follows writing body temperature data with samsung health data sdk suspend fun insertbodytemperaturedata healthdatastore healthdatastore { val bodytemperature = 37f val tenminutesasseconds = 10l * 60l val time = localdatetime now minusseconds tenminutesasseconds val zoneid = zoneoffset systemdefault val zoneoffset = zoneid rules getoffset time try { val healthdatapoint = healthdatapoint builder addfielddata datatype bodytemperaturetype body_temperature, bodytemperature setlocalstarttime time, zoneoffset setlocalendtime time, zoneoffset build val insertrequest = datatypes body_temperature insertdatarequestbuilder adddata healthdatapoint build healthdatastore insertdata insertrequest } catch e exception { e printstacktrace } } user profile the corresponding user profile data types in samsung health sdk for android and samsung health data sdk are as following samsung health sdk for android samsung health data sdk healthuserprofile userprofiledatatype example code for getting user profile data when using samsung health sdk for android is as follows getting user profile data with samsung health sdk for android fun readuserprofile healthdatastore healthdatastore { val userprofile = healthuserprofile getprofile healthdatastore val gender = gendernamebyid userprofile gender val height = userprofile height val weight = userprofile weight } fun gendernamebyid id int string { return when id { healthuserprofile gender_male -> "male" healthuserprofile gender_female -> "female" else -> "unknown" } } example code for getting user profile data when using samsung health data sdk is as follows getting user profile data with samsung health data sdk suspend fun readuserprofile healthdatastore healthdatastore { val readrequest = datatypes user_profile readdatarequestbuilder build try { val result = healthdatastore readdata readrequest result datalist lastornull ? let { datapoint -> val gender = datapoint getvalue datatype userprofiledatatype gender val height = datapoint getvalue datatype userprofiledatatype height val weight = datapoint getvalue datatype userprofiledatatype weight } } catch e exception { e printstacktrace } } getting data's source device code for getting source device information that provided sleep data when using samsung health sdk for android is as follows getting data's source device information with samsung health sdk for android fun getsourcedeviceinfoofsleepdata healthdatastore healthdatastore { val resultcount = 1 val resultoffset = 0 val handler = handler looper getmainlooper val healthdataresolver = healthdataresolver healthdatastore, handler val request healthdataresolver readrequest = healthdataresolver readrequest builder setdatatype healthconstants sleep health_data_type setsort healthconstants sleep start_time, sortorder desc setresultcount resultoffset, resultcount build try { healthdataresolver read request setresultlistener { result -> try { result? foreach { healthdata -> val deviceid = healthdata getstring healthconstants sleep device_uuid val healthdevice = healthdevicemanager healthdatastore getdevicebyuuid deviceid val devicename = healthdevice customname val devicetype = devicegroupnamebyid healthdevice group } } finally { result close } } } catch e exception { e printstacktrace } } fun devicegroupnamebyid id int string { return when id { healthdevice group_mobile -> "mobile" healthdevice group_external -> "external" healthdevice group_companion -> "companion or watch" else -> "unknown" } } to get source device information that provided sleep data when using samsung health data sdk, the following example code can be used getting data's source device information with samsung health data sdk suspend fun getsourcedeviceinfoofsleepdata healthdatastore healthdatastore { val resultcount = 1 val readrequest = datatypes sleep readdatarequestbuilder setordering ordering desc setlimit resultcount build try { val result = healthdatastore readdata readrequest result datalist foreach { sleepdata -> val devicemanager = healthdatastore getdevicemanager sleepdata datasource? let { datasource -> val device = devicemanager getdevice datasource deviceid val deviceid = device? id val devicename = device? name val devicetype = device? devicetype } } } catch e exception { e printstacktrace } } having a trouble? we are operating a developer support channel on the samsung developer site if you encounter any issue or any question, please visit https //developer samsung com/dev-support and submit your query after logging in your samsung account
featured health, design, galaxy watch
blogdesign inspiration is all around us; however, tapping into it is another story. fortunately, there are members of the samsung developers community who’ve cracked the code and defeated ‘designer’s block.’ we connected with several watch faces/themes designers and are excited to share their advice, creative processes, and sources of design inspiration in this blog series. this week, we’re featuring pedro machado from health face. a designer from spain, pedro focuses on creating sport watch faces designed for daily use. read on to learn about how he got into designing watch faces and how he finds inspiration for his stylish and functional designs. when and why did you start designing watch faces? in 2017, i read a news story from samsung promoting the design of watch faces and that explained some features of the galaxy watch studio program (formerly galaxy watch designer). afterwards, i was curious to try designing my own personalized watch face, since a few months prior my parents gave me a samsung smartwatch. i found watch face design interesting and started research on how i could start creating designs for others to enjoy on their devices. what does your design process look like? do you have a strict protocol or is it more free flowing? i like to use my free time as a chance to get inspired and come up with ideas that i can later transform into a design. once i have several ideas in mind, i put them on paper to see the possible combinations and shapes they can take on a watch. when the idea is clear or almost ready, i start preparing the design on my computer. once i have all the elements created, i mount my design in gws and test it on 4-5 devices to check that everything works correctly. how has your design approach evolved over time? in the beginning, i created varied designs of all styles, from formal and minimalist to fun with many patterns. however, after a year of experience and analyzing statistics, i concluded that sport designs that take advantage of watch characteristics are received well by users. that’s when i decided to create health face, focused on sports and daily life that many users can identify with and use to get the information they need. what was the inspiration for your most successful watch face and how did you make it a reality? i remember being inspired to create one of my most successful watch faces at the sdc19 conference in san josé, california. there was a prototype car with some very striking speed markers that gave me the idea to design a watch face with similar markers – i also thought it would contrast well with smart devices. health face nº58 how do you strike a balance between the vision you have for a watch face and its functionality? is this the most challenging part of the design process? i agree that this part is the most challenging, since sometimes an idea is difficult to translate to the screen. plus, there’s the added consideration of the user. if they have vision problems, they might need larger letters and numbers, and this can pose a challenge to your original idea. to achieve a good balance between the initial idea and the final product, it’s important from the beginning to think about all the possible errors or obstacles you may encounter with your design. that way, if any problem arises, they will likely be small and easy to solve. how do you navigate guidelines without compromising the integrity of your design? when you’re starting out, it’s impossible to know all the restrictions. you must be patient with yourself and learn from your experiences. eventually you’ll learn how to navigate those guidelines and create great designs. what’s the one piece of advice you’d give a designer who is stuck in a creative rut? my advice to a designer who can’t think of a new design is to not get overwhelmed by the lack of inspiration. i recommend disconnecting for an afternoon. go outside, play a sport, relax and clear your mind to help free space for new ideas. the world around us is constantly sending signals and clues to make new designs, so take advantage of it! thanks to pedro for sharing helpful advice on the design process, staying creative and finding inspiration for galaxy watch face designs. you can connect with pedro and health face on instagram, twitter, and facebook. designers, are you ready to take the next step and sell your work on samsung devices? submit your galaxy watch faces or themes portfolio before the submission window closes on february 23rd. stay tuned for the final installment in our ‘prime time design’ series featuring ramon campos from friss in motion and follow us on twitter at @samsung_dev for our latest updates.
Connect Samsung Developer Conference
websession health, tizen telehealth in samsung devices samsung display device (smart tvs & smart monitors) users will be able to launch telemedicine service within the samsung products. once you pick your physician, you can use one of the approved usb cameras to connect to the tv and jump on a video call with a physician via external service provider's built-in web applications. after a few account setup process on mobile / pc, you can easily start your session any time on tv without any additional complicated inputs. at your session, you can also receive a prescription to be filled in at a mail-in online pharmacy (pc or mobile) to receive prescription drugs at your doorstep. speakers sean park samsung electronics
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.