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

      doc

      Health Data Store

      health data store the sdk provides the health data store to access the health data with a user’s consent. the data in the health data store can be shared with other partner apps also. preparing data access an application needs to connect the health data store, and acquire data permission to access the data in the health data store. the following figure shows a basic flow for working with samsung health. in case of connection failure, all exceptions should be handled clearly with a proper message to the user. it helps to prevent unexpected operations on your application. for detailed code, see: app manifest health data connection snippet acquiring data permission snippet health data query healthdataresolver helps to access the data with apis of the following figure. all queries except inserting data can be requested through a filter to set the target range for a query. a data query is sent asynchronously or synchronously. asynchronous query is used usually and you can select one of the methods for your need. see the following examples for more information. asynchronous data query synchronous data query the query result is retrieved as the following table. request result insert()update()delete() baseresult read() readresult aggregate() aggregateresult see data query snippets in api reference. filter healthdataresolver.filter is very useful to clear the data range for reading, updating, and aggregating health data. multiple filters can be combined with: and() or() see more descriptions in api reference. data normalization the health data is stored based on the normalized unit as defined in international system of unit (si) in the following table. item unit height cm weight kg temperature celsius blood glucose mmol/l blood pressure mmhg hba1c % spo2 % calorie kcal speed m/s distance meter time millisecond water intake ml caffeine intake mg data normalization enables your application to read health data without the specific unit. it means that you should be careful to unify the data units when inserting health data to the health data store. healthdataunit helps to convert data value between different units. converting unit

      https://developer.samsung.com/health/android/data/guide/health-data-store.html
      1. Develop
      2. Health

      doc

      Health Data Type

      health data type the sdk provides useful predefined and custom data types. the supported data types are: activity daily step count trend step count exercise floorsclimbed rest sleep sleepstage food nutrition caffeine intake water intake health care body temperature blood glucose blood pressure heart rate oxygen saturation hba1c height weight see api reference for more data types. health document healthdocument environment info ambient temperature and humidity uv exposure user profile user profile (read-only) all data types have the following mandatory properties in the following table. each data type’s detailed properties are written in the api reference. property description uuid id of health data.assigned by the system when new data is created in samsung health. created_time utc time when data is created.assigned by the system when new data is created in samsung health. updated_time utc time when data is updated.assigned by the system when new data is created in samsung health. package_name application package name which provides data.assigned by the system when new data is created in samsung health. device_uuid device id which provides health data.

      https://developer.samsung.com/health/android/data/guide/health-data-type.html
      1. Develop
      2. Health

      doc

      Health Connect FAQ

      health connect faq to access samsung health data can i access samsung health data with health connect? yes. samsung health synchronizes data with health connect since version 6.22.5 (october 2022) and later. to read samsung health data or insert your application data to samsung health through health connect apis, data permission must be granted for health connect. health data from the galaxy watch is transferred to the samsung health application on the user’s smartphone and synchronized to health connect. for more information, see accessing samsung health data through health connect. which devices does health connect support? the health connect application can be installed on android mobile devices. it does not support wear os devices. which data types are synchronized between samsung health and health connect? activity data, such as steps and exercise, heart rate, and sleep, are synchronized between samsung health and health connect. for more information, see accessing samsung health data through health connect. can health connect read data from a galaxy watch? yes, indirectly. health data on the galaxy watch is sent to the samsung health application on the user’s smartphone and can be synchronized to health connect. for battery life reasons, the timing and frequency of data synchronization between the galaxy watch and samsung health follows its own policy. on the smartphone, if samsung health and health connect have been linked for data synchronization, samsung health inserts or updates its data to health connect as soon as data is created or changed. for more information, see the accessing samsung health data through health connect blog post. i cannot see samsung health data in health connect. what should i do? to make sure that data synchronization between samsung health and health connect is working correctly: in google play, check that the latest samsung health and health connect application versions are installed. if you want to access galaxy watch data, check the samsung health application version on the watch too. enable data permissions in the samsung health application. in samsung health, go to ”settings > health connect > app permissions > samsung health”. noteyou must enable the permissions through samsung health > settings > health connect, not through the phone settings > apps > health connect. in samsung health, go to “settings > sync with samsung account” and tap “sync now” .

      https://developer.samsung.com/health/health-connect-faq.html
      1. Develop
      2. Health

      doc

      Health Device Specs

      health device specs all samsung health device specs | apr 11, 2019 samsung health provides ble compatible guidelines and samsung health specifications to connect ble health devices with samsung health. ble compatible guidelines the following health devices can connect with samsung health through ble compatible guidelines. compatibility guideline - ble blood pressure monitors | v1.0 compatibility guideline - ble glucose meters | v1.0 compatibility guideline - ble heart rate monitors | v1.0 compatibility guideline - ble weight scales | v2.0 samsung health specifications the following health devices can connect with samsung health through samsung health specifications. samsung health specifications - ble enhanced heart rate monitors | v1.0 samsung health specifications - ble exercise monitors | v1.0 samsung health specifications - ble pedometers | v1.0 samsung health specifications - ble sleep monitors | v1.0 samsung health specifications - ble multiple health service device | v1.0 if a health device implements one more specs above ble multiple health service device specs should be applied together.

      https://developer.samsung.com/health/device/device-specs.html
      1. Develop
      2. Health

      doc

      Hello Health Data

      hello health data the following sections give you fundamentals for developing the samsung health's partner app. check first the development environment for samsung health's partner apps. importing library add the following library to the “libs” folder in your created application project. samsung-health-data-a.b.c.aar health data store connection add a <queries> element in your app manifest. <manifest . . . > <queries> <package android:name="com.sec.android.app.shealth" /> </queries> </manifest> connect to the health data store with healthdatastore. public class mainactivity extends activity { public static final string app_tag = "simplehealth"; private static mainactivity minstance = null; private healthdatastore mstore; private healthconnectionerrorresult mconnerror; private set<permissionkey> mkeyset; @override public void oncreate(bundle savedinstancestate) { // ... minstance = this; mkeyset = new hashset<permissionkey>(); mkeyset.add(new permissionkey(healthconstants.stepcount.health_data_type, permissiontype.read)); // create a healthdatastore instance and set its listener mstore = new healthdatastore(this, mconnectionlistener); // request the connection to the health data store mstore.connectservice(); } you can end the health data store connection when the activity is destroyed. @override public void ondestroy() { mstore.disconnectservice(); super.ondestroy(); } the connection result is sent to healthdatastore.connectionlistener. if it succeeds, acquiring data permission or querying data will be available. private final healthdatastore.connectionlistener mconnectionlistener = new healthdatastore.connectionlistener() { @override public void onconnected() { log.d(app_tag, "health data service is connected."); healthpermissionmanager pmsmanager = new healthpermissionmanager(mstore); try { // check whether the permissions that this application needs are acquired // request the permission for reading step counts if it is not acquired // get the current step count and display it if data permission is required // ... } catch (exception e) { log.e(app_tag, e.getclass().getname() + " - " + e.getmessage()); log.e(app_tag, "permission setting fails."); } } @override public void onconnectionfailed(healthconnectionerrorresult error) { log.d(app_tag, "health data service is not available."); showconnectionfailuredialog(error); } @override public void ondisconnected() { log.d(app_tag, "health data service is disconnected."); } }; the connection to the health data store can fail and you can check its error result through onconnectionfailed(). if there is an error, an application checks whether the health framework provides a solution with hasresolution() and calls resolve(). if the health framework provides its solution, resolve() makes an application move to one of the following page without a dialog message: app market's samsung health page to install or update it device's settings page to make samsung health available samsung health user's agreement page an application needs to show a proper message for each error case and call resolve(). private void showconnectionfailuredialog(healthconnectionerrorresult error) { alertdialog.builder alert = new alertdialog.builder(this); mconnerror = error; string message = "connection with samsung health is not available"; if (mconnerror.hasresolution()) { switch(error.geterrorcode()) { case healthconnectionerrorresult.platform_not_installed: message = "please install samsung health"; break; case healthconnectionerrorresult.old_version_platform: message = "please upgrade samsung health"; break; case healthconnectionerrorresult.platform_disabled: message = "please enable samsung health"; break; case healthconnectionerrorresult.user_agreement_needed: message = "please agree with samsung health policy"; break; default: message = "please make samsung health available"; break; } } alert.setmessage(message); alert.setpositivebutton("ok", new dialoginterface.onclicklistener() { @override public void onclick(dialoginterface dialog, int id) { if (mconnerror.hasresolution()) { mconnerror.resolve(minstance); } } }); if (error.hasresolution()) { alert.setnegativebutton("cancel", null); } alert.show(); } see the health data store for more information. permission request the meta-data element for the required data permission value in manifest works with the permission request api. if you want to request data permission for reading the step count, write its value in your application project's manifest as the following example. see privacy check flow in privacy. <application <meta-data android:name="com.samsung.android.health.permission.read" android:value="com.samsung.health.step_count" /> </application> create a permission key set and add a permission key for reading the step count. public class mainactivity extends activity { private set<permissionkey> mkeyset; @override public void oncreate(bundle savedinstancestate) { // ... mkeyset = new hashset<permissionkey>(); mkeyset.add(new permissionkey(healthconstants.stepcount.health_data_type, permissiontype.read)); // connect to health data store } and call healthpermissionmanager.requestpermissions() with its listener. private final healthdatastore.connectionlistener mconnectionlistener = new healthdatastore.connectionlistener() { @override public void onconnected() { log.d(app_tag, "health data service is connected."); healthpermissionmanager pmsmanager = new healthpermissionmanager(mstore); try { // check whether the permissions that this application needs are acquired map<permissionkey, boolean> resultmap = pmsmanager.ispermissionacquired(mkeyset); if (resultmap.containsvalue(boolean.false)) { // request the permission for reading step counts if it is not acquired pmsmanager.requestpermissions(mkeyset, mainactivity.this).setresultlistener(mpermissionlistener); } else { // get the current step count and display it // ... } } catch (exception e) { log.e(app_tag, e.getclass().getname() + " - " + e.getmessage()); log.e(app_tag, "permission setting fails."); } } // ... }; if requestpermissions() is called successfully, the permission ui is popped up to the user. the user's permission information is saved by selecting "done" after the user allows each data permission. and it is received through healthresultholder.resultlistener. private final healthresultholder.resultlistener<permissionresult> mpermissionlistener = new healthresultholder.resultlistener<permissionresult>() { @override public void onresult(permissionresult result) { log.d(app_tag, "permission callback is received."); map<permissionkey, boolean> resultmap = result.getresultmap(); if (resultmap.containsvalue(boolean.false)) { // requesting permission fails } else { // get the current step count and display it } } }; } see the health permission manager for more information.

      https://developer.samsung.com/health/android/data/guide/hello-health-data.html
      1. Develop
      2. Health

      web

      Health | Samsung Developers

      samsung health sdks leverage our health platform to develop powerful health applications for your galaxy watch or smartphone. samsung privileged health sdk samsung privileged health sdk samsung health stack samsung health stack samsung health sdk for device samsung health sdk for device accelerate innovation and research in health and wellness with samsung's new health sdks samsung's health sdks enable a broad ecosystem of partners to accelerate innovation and solution development in health and wellness. as galaxy watch sensors and capabilities improve, you can, with user consent, integrate health data from galaxy watch and smartphones into your existing applications and platforms, as well as create innovative and powerful new products that enhance users' well-being through health insights. for developing health-sensing apps using advanced sensors samsung privileged health sdk is a software platform that enables the medical community and digital health solution providers to harness the power of galaxy watch’s advanced sensors; providing both raw sensor signal data and processed data with our differentiated features. learn more request partnership for medical and clinical research studies samsung health stack encompasses open-source tools, applications, and services to ease running, managing, and analyzing medical research studies and clinician services that involve wearable devices in the android and wearos environment. learn more for connecting with compatible bluetooth low energy (ble) devices samsung health device sdk defines ble compatible guidelines and samsung health specifications based on bluetooth generic attributes (gatt), including service structure, to connect with samsung health. learn more for synchronizing data through health connect api samsung and google have collaboratively built a unified health platform that provides a simple and secure way to exchange health data between android apps. samsung health synchronizes its data with health connect, including steps, exercise, heart rate, and sleep. learn more learn how to use the samsung health sdks learn about using the samsung health sdks to implement useful features with our sample apps on code lab. go to code lab get technical support submit a technical support ticket for any questions you may have regarding the samsung health sdks. samsung account sign-in is required. go to technical support publications read our latest publications on samsung r&d health discover samsung digital healthcare technology solutions, including hospital technology, healthcare data security for mobile devices, and more. go to publications news and blogs press release samsung developers conference, digital health, together for tomorrow samsung electronics announces sdc23 bringing developers together for tomorrow at sdc23, samsung will highlight platform innovation including smartthings, bixby, knox and tizen. this focus will illustrate ways samsung’s various business areas and devices are expanding seamless customer experiences. in addition, the company will share its cooperation plan and open innovation strategies with developers and partners to build next-generation connected experiences for millions around the world. press release galaxy unpacked'23, galaxy wearable, digital health samsung galaxy watch6 and galaxy watch6 classic: inspiring your best self, day and night with the new galaxy watch6 and galaxy watch6 classic, we are delivering on our commitment to democratize advanced health monitoring tools, now offering easier access right from the wrist,” said tm roh, president and head of mobile experience at samsung electronics. “from sleep and fitness coaching to nutritional insights, samsung is providing new and convenient ways to help users gain understanding and take action for better health and wellness, every day and every night. press release ihrn, watch os, galaxy wearable samsung brings irregular heart rhythm notification to galaxy watch in 13 markets samsung electronics today announced that the irregular heart rhythm notification (ihrn) feature1 on the samsung health monitor app2 will soon be available in 13 markets starting this summer. combined with the app’s blood pressure3 and electrocardiogram (ecg)4 monitoring, the ihrn feature detects heart rhythms suggestive of atrial fibrillation (afib), helping galaxy watch users understand their heart health more comprehensively.” looking for a developer community? meet other developers, ask questions, and find the answers you are looking for go to developer forum

      https://developer.samsung.com/health/
      1. Develop
      2. Health

      web

      Samsung Health Stack

      samsung health stack open-source tech stack providing end-to-end solutions for collecting and analyzing research and clinical data. what can be done with samsung health stack? samsung health stack is an open-source toolset that provides end-to-end solutions for various medical research and clinician service use cases on android and wear os devices. it includes the app sdk, web portal, and a system to support backend services through api endpoints. view overview build, configure, and scale research studies samsung health stack caters to various application scenarios, including basic health-tracking apps and more intricate health and wellness solutions. samsung research toolkit prioritizes the end-user experience, enabling developers to design intuitive, user-friendly, and visually appealing health and wellness applications. by utilizing the pre-built modules of the app sdk, developers can save time and resources while customizing user interfaces to align perfectly with their brand's visual identity. participant app sdk the app sdk provides developers with highly customizable building blocks to create apps that collect participant data, such as onboarding, consent flow, surveys and tasks, and data visualization. learn more research study portal the web portal provides a ui portal customized to researchers' needs. it includes features for managing team members, creating and deploying app content, tracking consenting participants' activity, and analyzing data. learn more featured partners frequently asked questions go to faq find the most frequently asked questions about samsung health stack. technical support submit ticket submit a technical support ticket for any questions you may have regarding the samsung health sdks. samsung account sign-in is required.

      https://developer.samsung.com/health/stack
      1. Develop
      2. Health

      web

      Samsung Privileged Health SDK

      samsung privileged health sdk samsung privileged health sdk covers device-specific sensor data and enables partners to develop powerful health-sensing capabilities in their applications. what can be done with samsung privileged health sdk? the sdk supports an improved health tracking capability that allows your applications to track the user’s health data with the accelerometer, raw ecg (electrocardiogram), ppg (photoplethysmogram), heart rate, including inter-beat interval, body composition, and skin temperature. view overview request to become a partner would like become a partner after learning about what samsung privileged health sdk offers? fill out a partnership request form to become an official partner. request partnership get deeper health insights to open new possibilities the possible applications of the health data by samsung privileged health sdk are numerous, ranging from remote patient monitoring to digital therapeutics. in particular, the raw sensor signals and processed data can lead to the discovery of new digital biomarkers for detecting signs of certain health conditions. in a specific example, a partner app on galaxy watch can notify a user if it detects gait pattern anomalies while the user is walking, leading to an early prognosis of a health condition. featured partners frequently asked questions go to faq find the most frequently asked questions about samsung privileged health sdk. technical support submit ticket submit a technical support ticket for any questions you may have regarding the samsung health sdks. samsung account sign-in is required.

      https://developer.samsung.com/health/privileged
      1. Develop
      2. Health

      web

      Samsung Health SDK for Device

      samsung health sdk for device samsung health sdk for device includes bluetooth low energy (ble) compatible guidelines and samsung health specifications based on bluetooth generic attributes (gatt), including service structure, to connect with samsung health. what can be done with samsung health sdk for device? connect various ble compatible health devices to samsung health, enabling data synchronization and expansion into upcoming supported services, offering a straightforward guide for device integration. view overview connect compatible health devices samsung health provides users with the ability to connect to a wide range of ble devices, including those capable of syncing data like blood glucose, blood pressure, heart rate, and weight, with prospective expansion to devices such as pedometers, exercise sensors, and sleep monitors, all to offer users comprehensive health data management. featured partners technical support submit ticket submit a technical support ticket for any questions you may have regarding the samsung health sdks. samsung account sign-in is required.

      https://developer.samsung.com/health/device
      1. Learn
      2. Code Lab

      codelab

      Create a health research app using Samsung Health Stack

      create a health research app using samsung health stack objective create a health research app that collects and processes participant's health data, survey responses, and task results using samsung health stack. overview samsung health stack is an open-source technology stack offering end-to-end solutions for collecting and analyzing data from wearable devices in android and wear os environments. with applications ranging from medical research to clinician services and beyond, this tech stack provides the tools and infrastructure necessary to expedite the development and deployment of health-based studies. the framework includes: samsung health stack app sdk - a software development kit (sdk) for building android and wear os apps capable of collecting data from wearable devices. web portal - a customizable interface for creating surveys, managing team members, tracking participants, and analyzing data. backend services - api endpoints to access and interact with a robust data engine. see samsung health stack descriptions for detailed information. set up your environment you will need the following: installed and running samsung health stack backend system installed samsung health stack web portal firebase private key used during the backend system installation android studio (latest version recommended) android jetpack compose (latest version recommended) samsung galaxy mobile device with health connect app and samsung health app installed samsung galaxy watch synced to the mobile device google account sample code here is a sample code for you to start coding in this code lab. download it and start your learning experience! research app sample code (4.09 mb) create a firebase project follow the instructions at firebase.google.com/docs/android/setup to add a firebase project to the firebase account you created during the backend system installation. set applicationid as healthstack.sample and download the resulting google-services.json file from firebase. to learn more, see installing the app sdk - create a firebase project. create a new study sign in to the web portal page you deployed. on the study collection page, click the create new study button. noteonly the account who has team admin role can create a new study. see the role-based access control for more details about the differing levels of access permission granted to different roles. set your study name and logo. then click the continue button to create your study. select the principal investigator role and click the confirm button. the overview page appears like below: to connect your app to the backend system of your web portal, you need to know the id of your study. you can get the study id by opening chrome's developer tools. right-click on the web portal page and select inspect. then, open the network panel. click study settings from the left navigation bar. you can see activities recorded on the network tab. the value after projectid= is the id of the study, which you need to set up in the research app. connect the research app to the backend system in android studio, click open to open the project files of the research app. locate the downloaded android project (codelab-before) from the directory and click ok. copy and paste the downloaded google-services.json from firebase to samples > researchsample module. go to samples > researchsample > res > values, and in the strings.xml file, set the following values to connect the app to the backend system: research_platform_endpoint - backend system’s endpoint, including the port number research_project_id - id of the study created <!-- backend integration --> <string name="research_platform_endpoint">http://you.must.set.backend.url</string> <string name="research_project_id">study_id</string> customize the introduction page and eligibility survey the sample research app already includes introduction page and eligibility survey, which you can customize to align with the objective of your study. to modify the introduction page and eligibility survey questions, go to samples > researchsample > java > healthstack.sample and open the onboardingmodule.kt file. introduction page go to the intromodel constructor within the intro function, and create two introsections as below: overview - "a study on walking over an hour daily versus non-walkers." description - "we want to conduct a study to compare the daily life patterns of people who walk more than an hour each day and those who don't." sections = listof( introsection( "overview", "a study on walking over an hour daily versus non-walkers.", ), introsection( "description", "we want to conduct a study to compare the daily life patterns of people " + "who walk more than an hour each day and those who don’t." ) ) the introduction page would look like as below: eligibility survey part of the onboarding process is asking the participants questions through an eligibility survey to determine their suitability for your study. the eligibility survey consists of three steps: eligibilityintrostep - displays an introduction about the survey eligibilitycheckerstep - displays the eligibility questions eligibilityresultstep - displays the result of the survey based on the answers the eligibilitycheckerstep receives the eligibilityquestions. the questions can be a choicequestionmodel, datatimequestionmodel, or multichoicequestionmodel, depending on the type of survey question model you set. modify the eligibility question pages as below: eligibility question 1 type choicequestionmodel id average_walking_time query how many minutes on average do you spend walking each day? explanation unit: minute candidates listof(0, 30, 60, 90, 120) viewtype slider eligibility question 2 type choicequestionmodel id tracking_device query are you willing to wear a tracking device to monitor your dailywalking activity? candidates listof("yes, i'm willing to use a tracking device", "no, i'm notcomfortable using any tracking device") answer yes, i’m willing to use a tracking device eligibility question 3 type choicequestionmodel id participate query are you available and willing to commit to participating in thestudy for a specified duration? candidates listof("yes, i'm available and willing to commit", "no, i'm notavailable or willing to commit") answer yes, i’m available and willing to commit. private val eligibilityquestions: list<questionmodel<any>> = listof( choicequestionmodel( id = "average_walking_time", query = "how many minutes on average do you spend walking each day?", explanation = "unit: minute", candidates = listof(0, 30, 60, 90, 120), viewtype = slider ), choicequestionmodel( id = "tracking_device", query = "are you willing to wear a tracking device to monitor your daily walking activity?", candidates = listof( "yes, i’m willing to use a tracking device", "no, i’m not comfortable using any tracking device" ), answer = "yes, i’m willing to use a tracking device" ), choicequestionmodel( id = "participate", query = "are you available and willing to commit to participating in the study for a specified duration?", candidates = listof("yes, i’m available and willing to commit", "no, i’m not available or willing to commit"), answer = "yes, i’m available and willing to commit" ) ) you can make a pass condition for each question by setting the answer field. a failed result means the participant is not eligible for the study. after defining eligibility questions, the eligibility survey pages would look like as below: set health data permissions you can request permission to collect health data from your study participants. however, before requesting permissions, your app must first declare them in the manifest. go to researchsample module > res > values. in health_permissions.xml, you can declare permissions to read or write data on health connect for steps, sleepsession, sleepstage, oxygensaturation, and bloodpressure data types. notepermission to read and write heartrate data is already declared in the project. <item>androidx.health.permission.steps.read</item> <item>androidx.health.permission.steps.write</item> <item>androidx.health.permission.sleepsession.read</item> <item>androidx.health.permission.sleepsession.write</item> <item>androidx.health.permission.sleepstage.read</item> <item>androidx.health.permission.sleepstage.write</item> <item>androidx.health.permission.oxygensaturation.read</item> <item>androidx.health.permission.oxygensaturation.write</item> <item>androidx.health.permission.bloodpressure.read</item> <item>androidx.health.permission.bloodpressure.write</item> tipfor more information, see the list of data types and permissions. then, go back to healthstack.sample folder. in researchapplication.kt, request permissions from the participants to collect required health data. val healthdatarequired = listof("heartrate", "sleepsession", "sleepstage", "bloodpressure", "steps", "oxygensaturation") tipsee the list of health data types you can collect on health connect. set sync interval and choose health data to display you can set the sync interval per health data type. however, it is recommended to set a minimum interval of 15 minutes because the app is using android's workmanager. tipto learn more about the workmanager, see periodicworkrequest. in mainactivity.kt, set healthdatasyncspecs as below: health data type sync interval heartrate 15 minutes steps 20 hours sleepsession 1 day sleepstage 1 day oxygensaturation 30 minutes bloodpressure 30 minutes val healthdatasyncspecs = listof( syncmanager.healthdatasyncspec("heartrate", 15, timeunit.minutes), syncmanager.healthdatasyncspec("steps", 20, timeunit.hours), syncmanager.healthdatasyncspec("sleepsession", 1, timeunit.days), syncmanager.healthdatasyncspec("sleepstage", 1, timeunit.days), syncmanager.healthdatasyncspec("oxygensaturation", 30, timeunit.minutes), syncmanager.healthdatasyncspec("bloodpressure", 30, timeunit.minutes), ) you can set which data type to display in the research app. the status card for heart rate is already set to display. to show other status cards, such as sleepsessionstatus, add them to the list of healthdatatodisplay. val healthdatatodisplay = listof(heartratestatus, sleepsessionstatus, taskstatus) run the app, join the study and sync your health data build and run the app on a samsung galaxy mobile device. ensure the samsung health app and health connect app is installed on the device and a galaxy watch is connected. notereset the app to its initial state by clearing its data. go to your phone's settings and then swipe to and tap apps. select or search for the researchsample app. tap storage, tap clear data, and then click ok. in the research app, you can join the study by signing in with your google account after passing the eligibility survey, providing consent, and allowing data access to health connect. the research app shows your heart rate data (bpm) and the time you spent sleeping (hrs) based on the data from your galaxy watch and mobile device. notethe data shows and updates in the app based on the sync interval you set. if you want the heart rate data to display immediately, you can measure your heart rate manually using the galaxy watch. then, click the sync health data button in the research app's settings. check health connect's recent logs if data is not showing or updating. the web portal also displays and processes the data from the research. to see the average heart rate data, go to the overview section. scroll to the participant list table, then click the participant data row. the participant management shows health data collected on average, such as heart rate. create a survey task a survey is a sequence of questions that collect information from the participants in your study. in this step, create a survey task and see the result from the web portal. go to the study management section and expand the task management. open the surveys tab and click the create survey button on the top right corner. set survey title as daily survey. then, write three questions as below: after writing all the survey questions, click the publish button. set the frequency as daily and the publish time as early as possible. then, click the publish button on the bottom right corner. you can find your survey task on the published list. go to the research app and touch the refresh button next to upcoming tasks or today to see the survey you created. answer and complete the survey task. go back to the web portal. click your survey task from the published list. reload the web page or re-login to get the result. you can see the survey report in the responses and analytics tab. create an activity task activities allow researchers to collect specific types of data from users. for this study, add an activity to collect measurements related to manual dexterity. in study management, go to the activities tab and click the create activity button. select motor for the activity category and choose tapping speed. click the create button. click the publish button on the task edit page. set frequency as daily and publish time as early as possible. then, click the publish button. you can find your activity task on the published list. in the research app, touch the refresh button to see the newly added activity. open and perform the activity task. in the web portal, click your activity task from the published list. enter the participant id to see the collected data. you're done! congratulations! you have successfully achieved the goal of this code lab. now, you can create your own research app that can collect and process users’ health data, answers to survey and activity task results for research purposes by yourself! to learn more, see samsung health stack.

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

      Copyright © 2023 SAMSUNG. All rights reserved.