Filter
-
Content Type
-
Category
Mobile/Wearable
Visual Display
Digital Appliance
Platform
Recommendations
Filter
Learn Code Lab
codelabtrack deadlift exercise on galaxy watch objective create a native app for galaxy watch, operating on wear os powered by samsung, using health services to track deadlift exercise this app measures repetition count, calories burned, and time spent during the exercise overview health services provides a simple and unified way for accessing a wide range of health and wellness related data with health services api, you will no longer need to develop your own algorithms processing sensors data in order to compute metrics like heart rate, steps counts, distance, calories burned, and other more these are now accessible through health services embedded on wearables operating on wear os powered by samsung see health platform descriptions for detailed information set up your environment you will need the following galaxy watch4 or newer android studio latest version recommended java se development kit jdk 11 or later sample code here is a sample code for you to start coding in this code lab download it and start your learning experience! health track deadlift sample code 132 83 kb turn on developer mode and adjust its settings on your watch, go to settings > about watch > software and tap on software version 5 times upon successful activation of developer mode, a toast message will display as on the image below afterwards, developer options will be visible under settings tap developer options and enable the following options adb debugging debug over wi-fi turn off automatic wi-fi connect your galaxy watch to wi-fi go to settings > connection > wi-fi and make sure that wi-fi is enabled from the list of available wi-fi networks, choose and connect to the same one as your pc when successfully connected, tap a wi-fi network name, swipe down, and note the ip address you will need this to connect your watch over adb from your pc connect your galaxy watch to android studio in android studio, go to terminal and type adb connect <ip address as mentioned in previous step> when prompted, tap always allow from this computer to allow debugging upon successful connection, you will see the following message in android studio’s terminal connected to <ip address of your watch> now, you can run the app directly on your watch start your project after downloading the sample code containing the project files, open your android studio and click open to open an existing project locate the downloaded android project deadlift from the directory and click ok check dependency and app manifest in the dependencies section of gradle scripts > build gradle module app file, see the appropriate dependency for health services dependencies { implementation 'androidx health health-services-client 1 0 0-beta03' // } notesince the library might update from time to time, it is recommended to choose the version suggested by android studio in androidmanifest xml file, note the following <queries> element <queries> <package android name="com google android wearable healthservices" /> </queries> section with requests for necessary permissions <uses-permission android name="android permission body_sensors" /> <uses-permission android name="android permission activity_recognition" /> check capabilities to check what can be measured during an exercise, you need to check its capabilities go to app > java > com samsung sdc21 deadlift open the deadliftutil java file and navigate to the checkcapabilities method an inner class c definition implements the methods of the futurecallback interface within this definition, define the onsuccess method to retrieve the exercise type capabilities public void onsuccess exercisecapabilities result { objects requirenonnull result ; log i tag, "got exercise capabilities" ; /*********************************************************************************** * [practice 1] define the onsuccess method * * - hint uncomment lines below and replace todo 1 * call getexercisetypecapabilities method of result object, * passing already initialized t as an argument **********************************************************************************/ final exercisetype t = exercisetype deadlift; // final exercisetypecapabilities capabilities = "todo 1" // final exerciseconfig builder builder = exerciseconfig builder t ; // builder setdatatypes capabilities getsupporteddatatypes ; // exerciseconfigbuilder = builder; } next, implement the findcapabilitesfuture method to get a callback with exercisecapabilities getcapabilitiesasync returns the exercisecapabilities of the exerciseclient for the device static listenablefuture<exercisecapabilities> findcapabilitiesfuture exerciseclient client { /******************************************************************************************* * [practice 1] create a listenablefuture object that will get a callback with * with exercise capabilities choose the correct method from exerciseclient * * - hint uncomment line and replace null with todo 2 * for checking capabilities use getcapabilitiesasync method ******************************************************************************************/ return null; //"todo 2"; } start the exercise inside the startexercise method, there is a call to the futures addcallback method this method adds a callback function that executes when the asynchronous operation of starting the exercise completes set an update callback for the exercise client within the onsuccess method of the callback function public void onsuccess void result { log i tag, "successfully started" ; /*************************************************************************** * [practice 2] set an update callback * * - hint uncomment lines below and fill todos * 1 make appropriate call of setupdatecallback method * and pass exerciseupdatelistener object as an argument * 2 change ismeasurementrunning flag value to true **************************************************************************/ // exerciseclient setupdatecallback "todo 3 1 " ; log i tag, "successfully set update listener" ; // "todo 3 2 " } in the deadlift java file, call the startexercise method in onbuttonclickhelper public void onbuttonclickhelper { /******************************************************************************************* * [practice 2] start the exercise using a method from deadliftutil java * * - hint uncomment line below and fill todo 4 * call startexercise method on util object * ****************************************************************************************/ // "todo 4" } get the results go to the deadliftutil java file, and in the getnewrepsvalue method, call the getlatestmetrics method from the exerciseupdate class to get the data collected during the exercise store the data in the resultlist, where the last element holds the most up-to-date value of all your repetitions public long getnewrepsvalue exerciseupdate update, deltadatatype<long, intervaldatapoint<long>> datatype { /******************************************************************************************* * [practice 3] get the data collected during exercise * * - hint uncomment lines below and fill todo 5 * call getlatestmetrics method of exerciseupdate object * then, get the data of appropriate type * for this, you can use dedicated method getdata , passing datatype as an argument * ****************************************************************************************/ // final list<intervaldatapoint<long>> resultlist = "todo 5" // if !resultlist isempty { // final int lastindex = resultlist size - 1; // return resultlist get lastindex getvalue ; // } return no_new_value; } run unit tests for your convenience, you will find an additional unit tests package this will let you verify your code changes even without using a physical watch see instruction below on how to run unit tests right click on com samsung sdc21 deadlift test > deadliftunittest and execute run 'deadliftunittest' command if you completed all the tasks correctly, you will see all the unit tests passed successfully run the app after building the apk, you can run the application on a connected device to measure actual deadlift parameters right after the app is started, it will request for the user permission allow the app to receive data of the activity afterwards, the application main screen will be shown before doing deadlifts, press the start button to track your exercise when done, tap on the stop button you're done! congratulations! you have successfully achieved the goal of this code lab now, you can create a deadlift exercise tracker app by yourself! if you're having trouble, you may download this file health track deadlift complete code 132 42 kb learn more by going to health platform
Learn Code Lab
codelabcreate a watch face using tag expressions objective learn how to create a watch face that responds based on the date, time, step count, heart rate, and battery level using tag expressions in watch face studio in this code lab, you will create a basic watch face with complications such as step count, heart rate, and battery level later, you will improve its functionalities and make it visually dynamic using tag expressions overview watch face studio is a graphic authoring tool that enables you to create watch faces for wear os it offers a simple and intuitive way to add images and components, and to configure the watch movement without any coding watch face studio supports watch faces for the galaxy watch4 or newer version, and other watch devices that run on the same platform tag expressions are conditions in watch face studio that allows you to customize watch face through dynamic configuration of its movement and data set up your environment you will need the following watch face studio galaxy watch4 or newer any supported wear os watch start your project create a new project and input project name a blank studio will show upon clicking ok add analog hands and index watch face studio allows you to add components like text, image, shape, analog hands, and index in a watch face for your watch to have the look and feel of an analog watch, add the following components time > index time > analog hands > minute time > analog hands > hour notethe index and watch hand images used in this code lab are no longer included in the latest version of the watch face studio however, you can choose a design for the index and watch hands from available images in the resources folder you can also create and add your own design you will see that the hands move automatically and in sync with the device time select all the newly added components and click group rename the group as group_analogtime use a progress bar for seconds a component like a progress bar can be used to show how much of the process is completed and how much is left in this step, you will use it to show how far or close the next minute is to use a progress bar as seconds click add component and select progress bar rename the component to seconds move seconds behind group_analogtime in properties of seconds, do the following a adjust the dimension width and height to 395 b align the component to the center c drag the background slider to 0% d make sure that the type is a circular progress bar; otherwise change it e in range setting, change value to 0 and click tags beside it to open the tags window f type in [sec] it means that the value from 0 will increment as the value of the second increases g set max value to 59 since it is the maximum value of [sec] notein this scenario, the progress bar disappears in the canvas as the preview only uses the base value, which is 0 however, the component is still present in run format and position a digital clock in this step, you will learn how grouping works and affects its components you will also learn how to format the date and time using tags to format and position a digital clock, you need to add a digital clock > time twice rename them as hour and minute, respectively add a digital clock > date and rename the component as date put them in one group and rename it as group_digitaltime go to the properties of hour and change the text appearance to 80 do the same for minute adjust the text size of date to 15 adjust the y placements of the individual components to look like the image below when you change a certain component, it won’t affect other components in the group format hour to only show the time in hour a go to its properties and click the tags button in text field b replace text field value with [hour_0_23_z] to show the current hour with leading zero do the same for minute but replace the text field value with [min_z] to show the current minute in an hour with leading zero go to group_digitaltime placement properties and align it horizontally after that, place it to the left you will see the components adjusted as a group utilize health features and battery level watch face studio also allows you to utilize data like step count, heart rate, and battery level follow the steps below to show these real-time data using tags on texts or progress bar battery level add a circular progress bar and rename the component as battery level drag the background slider to 0% go to value properties replace the value with 0 and, in tags, input or choose [batt_per] to use the current battery percentage as the value add a circle complication slot and rename it as battery icon complications are a set of components that can be handled as one group set the type to fixed and change the default provider to watch battery select short text as complication type and choose icon + text for layout select and move battery level and battery icon together to the bottom right heart rate add a circular progress bar and rename the component as heart rate drag the background slider to 0% go to value properties replace the value with 0 and, in tags, input or choose [hr] to use heart rate as value set the max value to 240 since it's the maximum heart rate a person can have add a text component and rename it as heart rate label in the text field, input heart rate and change the text size to 12 change the y placement to 195 add another text component and rename it as heart rate text in the text field, input [hr] and change the text size to 30 group heart rate, heart rate label, and heart rate text together rename the group as group_heartrate move the group_heartrate placement to the center right step count add a circular progress bar and rename the component as step count drag the background slider to 0% go to value properties replace the value with 0 and, in tags, input or choose [sc_per] to use the current percentage to the goal of step count add a circle complication slot and rename it as step count text set the type to fixed and change the default provider to step count select short text as complication type and choose text + title for layout it will now show "steps" as title and step count as text place the step count text in the center horizontally select and move step count and step count text together to the top right select group_digitaltime, group_batterylevel, group_heartrate, group_stepcount, battery icon, and step count text drag them behind group_analoghands and seconds by doing this, the analog hands would overlap the components make use of tag expressions you already have three progress bars that show data of battery level, heart rate, and step count this time, you will make these features more functional by changing the progress bars' color to red using tag expressions tag expressions are conditions that allow you to change the rotation, placement, behavior, and opacity of a component based on tag values it can alter your watch face's appearance dynamically as the tag value changes tag expressions support different types of operators – arithmetic, relational, logical, and ternary for this step, you will apply tag expressions on the color opacity but first, you will have to duplicate all the circular progress bars seconds, battery level, heart rate, and step count move all the duplicates to a new group called group_colorchange make sure that group_colorchange is behind all other groups change individual component’s color to #ffffff or white duplicate this group and rename it as group_background move it behind group_colorchange drag the background slider to 16% and remove tags in the value properties of each component of group_background change group_colorchange color to #ff001e or red group_colorchange will be used as components underneath when you set the opacity of the main components to 0 using tag expressions group_background will serve as gap fillers of each progress bar below are conditions that will trigger the opacity of the main components to become 0 and reveal the duplicated red components change the color of the battery level to red if the battery level is equal to or less than 20% go to group_batterylevel and select battery level navigate to color properties check if the color opacity value is 100 this will serve as the base value in tags, input [batt_per]<=20?-100 0 to subtract 100 from the base value of opacity if the battery level is equal to or less than 20 otherwise, the base opacity value remains the same in the run pane, adjust the device > watch battery to 20% or less, and you will see how the color will change to red change the color of step count to red if the goal hasn't been reached yet and the time is already 18 00 6 00 pm or beyond go to group_stepcount and select step count navigate to color properties check if the color opacity value is 100 this will serve as the base value in tags, input [sc]<[sc_goal] * [hour_0_23]>=18 ?-100 0 to subtract 100 from the base value of opacity if the step count is less than the goal, and if the value of hour in a day is 18 or beyond otherwise, the base opacity value remains the same play with the time control bar in the run pane and health > steps data to see how the color will change from blue to red change the color of the heart rate and seconds to red if the heart rate is below or above the normal go to group_heartrate and select heart rate navigate to color properties check if the color opacity value is 100 this will serve as the base value in tags, input [hr]<60 + [hr]>100 ?-100 0 to subtract 100 from the base value of opacity if the heart rate is below or above the normal 60-100 otherwise, it remains the same do the same for seconds test it in the run pane by adjusting the health > heart rate to below 60 or above 100, and you will see how the color will change to red prolong the battery life now that you already know what group and tag expressions are, it's about time for you to use both to your advantage it is observed that the darker a watch face design is, the longer the battery life can be to help the watch stay powered even when there’s a little battery left, you will need to decrease the opacity of the watch face when the battery level is equal to or less than 10% to do this, you have to select and combine all created groups and components, except for group analogtime, battery icon, and step count text, to a new group called group_watchface go to group_watchface color properties and change the base opacity value to 20 in tags, input [batt_per]<=10?0 80 to add 0 to the base value of opacity if the battery level is equal to or less than 10 otherwise, it adds 80 to the base value, making the watch face 100% visible adjust the device > watch battery to 10% or less, and you will see how most components' opacity decreased choose components for always-on always-on display is a feature that allows your galaxy watch to show the time without checking on it by pressing a button or lifting your hand in watch face studio, you can choose which group or component to display on the always-on by following these steps go to the always-on tab, to see the same set of components you added and grouped click the eye icon next to the group name to hide or make it visible hide group_watchface, battery icon, and step count text at this point, your always-on display will display a basic analog watch face whenever your watch is in idle mode test the watch face to test your watch face, you need to connect a watch device to the same network as your computer in watch face studio, select project > run on device select the connected watch device you want to test with if your device is not detected automatically, click scan devices to detect your device or enter its ip address manually by clicking the + button you're done! congratulations! you have successfully achieved the goal of this code lab now, you can create and design a watch face using tag expressions by yourself! if you're having trouble, you may download this file tag expression complete project 272 71 kb to learn more about watch face studio, visit developer samsung com/watch-face-studio
Learn Code Lab
codelabcreate a daily step counter on galaxy watch objective create a native app for galaxy watch, operating on wear os powered by samsung, using health platform to read your daily steps overview health platform provides a unified and straightforward way for accessing a wide range of health and wellness related data with health platform api, you may easily read and write data stored in health platform on android and wear os powered by samsung applications can have access to these secured data only with explicit user consent additionally, users may disable access to the data at any point in time see health platform descriptions for detailed information set up your environment you will need the following galaxy watch4 or newer android studio latest version recommended java se development kit jdk 11 or later sample code here is a sample code for you to start coding in this code lab download it and start your learning experience! health step count sample code 119 87 kb turn on developer mode and adjust its settings on your watch, go to settings > about watch > software and tap on software version 5 times upon successful activation of developer mode, a toast message will display as on the image below afterwards, developer options will be visible under settings tap developer options and enable the following options adb debugging debug over wi-fi turn off automatic wi-fi connect your galaxy watch to wi-fi go to settings > connection > wi-fi and make sure that wi-fi is enabled from the list of available wi-fi networks, choose and connect to the same one as your pc when successfully connected, tap a wi-fi network name, swipe down, and note the ip address you will need this to connect your watch over adb from your pc connect your galaxy watch to android studio in android studio, go to terminal and type adb connect <ip address as mentioned in previous step> when prompted, tap always allow from this computer to allow debugging upon successful connection, you will see the following message in android studio’s terminal connected to <ip address of your watch> now, you can run the app directly on your watch start your project after downloading the sample code containing the project files, in android studio click open to open existing project locate the downloaded android project stepcount from the directory and click ok check dependency and app manifest in the dependencies section of stepcount/app/build gradle file, see the appropriate dependency for health platform dependencies { implementation com google android libraries healthdata health-data-api 1 0 0-alpha01' // } notelibrary might update from time to time if necessary, choose the version suggested by android studio request for data permissions before accessing any data through health platform, the client app must obtain necessary permissions from the user in permissions java, create a permission instance to trigger relevant permission screen and obtain required consent from end user data type name intervaldatatypes steps read access accesstype read /******************************************************************************************* * [practice 1] build permission object grand permissions for read today's steps * - set interval data type of steps * - set read access type ------------------------------------------------------------------------------------------- * - hint uncomment lines below and fill todos with * 1 for interval data type intervaldatatypes steps * 2 for read access accesstype read ******************************************************************************************/ permission stepsreadpermission = permission builder // setdatatype "todo 1 1 " // setaccesstype "todo 1 2 " build ; make a query to aggregate today’s steps create read request with all necessary information to read data through health platform api the answer from the platform will be asynchronous with the result from which you can get all the data you are interested in follow the steps below to get today's steps count in stepsreader java, create a readaggregateddatarequest with cumulativeaggregationspec instance data type name intervaldatatypes steps /******************************************************************************************* * [practice 2] build read aggregated data request object for read today's steps * - set interval data type of steps ------------------------------------------------------------------------------------------- * - hint uncomment line below and fill todo 2 with * 1 for interval data type intervaldatatypes steps ******************************************************************************************/ readaggregateddatarequest readaggregateddatarequest = readaggregateddatarequest builder settimespec timespec builder setstartlocaldatetime localdatetime now with localtime midnight build // addcumulativeaggregationspec cumulativeaggregationspec builder "todo 2 1 " build build ; read cumulative steps count from cumulativedata set variable steps value to 0l it is the count of daily steps get aggregatedvalue object using cumulativedata api cumulativedataaggregateddata representing total of intervaldata over a period of time e g total steps in a day public aggregatedvalue gettotal check the result if it is not null, get aggregated value using aggregatedvalue api aggregatedvaluevalue fields aggregated over a period of time only numeric fields longfield, doublefield can be included in aggregation public long getlongvalue returns all longfields and their values that are already set add value to the daily steps result counter /******************************************************************************************* * [practice 3] read aggregated value from cumulative data and add them to the result * - get aggregatedvalue from cumulativedata object * - get steps count from aggregatedvalue object ------------------------------------------------------------------------------------------- * - hint uncomment lines below and replace todo 3 with parts of code * 1 get aggregatedvalue object 'obj' using cumulativedata gettotal * 2 get value using obj getlongvalue and add to the result ******************************************************************************************/ long steps = 0l; if result != null { list<cumulativedata> cumulativedatalist = result getcumulativedatalist ; if !cumulativedatalist isempty { for cumulativedata cumulativedata cumulativedatalist { //"todo 3 1 " //"todo 3 2 " } } } return steps; run unit tests for your convenience, you will find an additional unit tests package this will let you verify your code changes even without using a physical watch see instruction below on how to run unit tests right click on com samsung sdc21 stepcount test and execute run 'tests in 'com samsung sdc21 stepcount'' command if you completed all the tasks correctly, you will see all the unit tests passed successfully run the app after building the apk, you can run the application on a connected device to see real-life aggregated steps count measured by a smartwatch right after the app is started, it will request for the user permission allow the app to receive data of the activity afterwards, the application main screen will be shown it will automatically display today’s step count tap on refresh button to read current steps count from health platform you're done! congratulations! you have successfully achieved the goal of this code lab now, you can create a daily step counter app by yourself! if you're having trouble, you may download this file health step count complete code 119 79 kb learn more by going to health platform
Learn Code Lab
codelabmeasure blood oxygen level on galaxy watch objective create a health app for galaxy watch, operating on wear os powered by samsung, utilizing samsung health sensor sdk to trigger and obtain blood oxygen level spo2 measurement results overview samsung health sensor sdk provides means of accessing and tracking health information contained in the health data storage its tracking service gives raw and processed sensor data such as accelerometer and body composition data sent by the samsung bioactive sensor the latest bioactive sensor of galaxy watch runs powerful health sensors such as photoplethysmogram ppg , electrocardiogram ecg , bioelectrical impedance analysis bia , sweat loss, and spo2 see samsung health sensor sdk descriptions for detailed information set up your environment you will need the following galaxy watch4 or newer android studio latest version recommended java se development kit jdk 11 or later sample code here is a sample code for you to start coding in this code lab download it and start your learning experience! measuring blood oxygen level sample code 146 3 kb connect your galaxy watch to wi-fi go to settings > connection > wi-fi and make sure that wi-fi is enabled from the list of available wi-fi networks, choose and connect to the same one as your pc turn on developer mode and adjust its settings on your watch, go to settings > about watch > software and tap on software version 5 times upon successful activation of developer mode, a toast message will display as on the image below afterwards, developer options will be visible under settings tap developer options and enable the following options adb debugging in developer options find wireless debugging turn on wireless debugging check always allow on this network and tap allow go back to developer options and click turn off automatic wi-fi notethere may be differences in settings depending on your one ui version connect your galaxy watch to android studio go to settings > developer options > wireless debugging and choose pair new device take note of the wi-fi pairing code, ip address & port in android studio, go to terminal and type adb pair <ip address> <port> <wi-fi pairing code> when prompted, tap always allow from this computer to allow debugging after successfully pairing, type adb connect <ip address of your watch> <port> upon successful connection, you will see the following message in android studio’s terminal connected to <ip address of your watch> now, you can run the app directly on your watch turn on developer mode for health platform on your watch go to settings > apps > health platform quickly tap health platform title for 10 times this enables developer mode and displays [dev mode] below the title to stop using developer mode, quickly tap health platform title for 10 times to disable it start your project in android studio, click open to open existing project locate the downloaded android project from the directory and click ok check capabilities for the device to track data with the samsung health sensor sdk, it must support a given tracker type – blood oxygen level to check this, get the list of available tracker types and verify that the tracker is on the list in the connectionmanager java file, navigate to the isspo2available function, use a provided healthtrackingservice object to create a healthtrackercapability instance, send it to the checkavailabletrackers function, and assign its result to the availabletrackers list gettrackingcapability returns a healthtrackercapability instance in the healthtrackingservice object healthtrackingservicehealthtrackingservice initiates a connection to samsung's health tracking service and provides a healthtracker instance to track a healthtrackertype public healthtrackercapability gettrackingcapability provide a healthtrackercapability instance to get a supporting health tracker type list /****************************************************************************************** * [practice 1] check capabilities to confirm spo2 availability * * ---------------------------------------------------------------------------------------- * * hint replace todo 1 with java code * get healthtrackercapability object from healthtrackingservice * send the object to checkavailabletrackers ******************************************************************************************/ public boolean isspo2available healthtrackingservice healthtrackingservice { if healthtrackingservice == null return false; list<healthtrackertype> availabletrackers = null; //"todo 1" if availabletrackers == null return false; else return availabletrackers contains healthtrackertype spo2_on_demand ; } check connection error resolution using samsung health sensor sdk api, resolve any error when connecting to health tracking service in the connectionmanager java file, navigate to the processtrackerexception function, and check if the provided healthtrackerexception object has a resolution assign the result to hasresolution variable hasresolution function in the healthtrackerexception object checks if the api can fix the error healthtrackerexceptionhealthtrackerexception contains error codes and checks the error's resolution if there is a resolution, solving the error is available by calling resolve activity boolean hasresolution checks whether the given error has a resolution /******************************************************************************************* * [practice 2] resolve healthtrackerexception error * * ----------------------------------------------------------------------------------------- * * hint replace todo 2 with java code * call hasresolution on healthtrackerexception object ******************************************************************************************/ public void processtrackerexception healthtrackerexception e { boolean hasresolution = false; //"todo 2" if hasresolution e resolve callingactivity ; if e geterrorcode == healthtrackerexception old_platform_version || e geterrorcode == healthtrackerexception package_not_installed observerupdater getobserverupdater notifyconnectionobservers r string novalidhealthplatform ; else observerupdater getobserverupdater notifyconnectionobservers r string connectionerror ; log e tag, "could not connect to health tracking service " + e getmessage ; } initialize spo2 tracker before the measurement starts, initialize the spo2 tracker by obtaining the proper health tracker object in the spo2listener java file, navigate to the init function using the provided healthtrackingservice object, create an instance of the spo2 tracker and assign it to the spo2tracker object gethealthtracker with healthtrackertype spo2_on_demand as an argument will create a healthtracker instance healthtrackingservicehealthtrackingservice initiates a connection to samsung's health tracking service and provides a healthtracker instance to track a healthtrackertype healthtracker gethealthtracker healthtrackertype healthtrackertype provides a healthtracker instance for the given healthtrackertype /******************************************************************************************* * [practice 3] initialize spo2 tracker * * ---------------------------------------------------------------------------------------- * * hint replace todo 3 with java code * initialize spo2tracker with proper samsung health sensor sdk functionality * call gethealthtracker on healthtrackingservice object * use healthtrackertype spo2_on_demand as an argument ******************************************************************************************/ void init healthtrackingservice healthtrackingservice { //"todo 3" } perform measurement for the client app to start obtaining the data through the sdk, it has to set a listener method on the healthtracker the application setups the listener when the user taps on the measure button each time there is new data, the listener callback receives it after the measurement is completed, the listener has to be disconnected due to battery drain, on-demand measurement should not last more than 30 seconds the measurement is cancelled if the final value is not delivered in time note that the sensor needs a few seconds to warm up and provide correct values, which adds to the overall measurement time the blood oxygen level values come in the ondatareceived callback of trackereventlistener in spo2listener java file, you can see the code for reading the value private final healthtracker trackereventlistener spo2listener = new healthtracker trackereventlistener { @override public void ondatareceived @nonnull list<datapoint> list { for datapoint data list { updatespo2 data ; } } }; private void updatespo2 datapoint data { int status = data getvalue valuekey spo2set status ; int spo2value = 0; if status == measurement_completed spo2value = data getvalue valuekey spo2set spo2 ; observerupdater getobserverupdater notifytrackerobservers status, spo2value ; } run unit tests for your convenience, you can find an additional unit tests package this lets you verify your code changes even without using a physical watch see instructions below on how to run unit tests right click on com samsung health spo2tracking test and execute run 'tests in 'com samsung health spo2tracking'' command if you completed all the tasks correctly, you can see that all the unit tests passed successfully run the app after building the apk, you can run the application on a connected device to measure blood oxygen level right after the app is started, it requests for user permission allow the app to receive data from the body sensors afterwards, it shows the application's main screen to get the blood oxygen level, tap on the measure button to stop the measurement, tap on the stop button you're done! congratulations! you have successfully achieved the goal of this code lab now, you can create a health app that measures blood oxygen level by yourself! if you're having trouble, you may download this file measuring blood oxygen level complete code 146 2 kb to learn more about samsung health, visit developer samsung com/health
Develop Health
docrelease note release date september 22, 2024 release version v1 3 0 target device the samsung health sensor sdk are supported on the following watch devices that run on wear os powered by samsung galaxy watch4 series and later models sdk content content description documents api reference programming guide library tracking library of the samsung health sensor sdk import it in your app project samsung-health-sensor-api aar sample apps measure blood oxygen measure blood oxygen and heart rate heart rate tracker transfer measured heart rate to a connected phone measure skin temperature ecg monitor sweat loss monitor features the tracking apis of the samsung health sensor sdk enable partner application to register an event for tracking health sensor data and to retrieve that data while tracking on a galaxy watch capabilities the samsung health sensor sdk provides the available tracker types on the watch measuring watch’s health sensor data a partner application using the sdk can measure health-sensor data of a galaxy watch the following tracker types are supported [continuous tracker types] the following tracker types can be measured continuously until unsetting the tracker type’s event listener continuous tracker types operate with low battery consumption of the galaxy watch accelerometer heart rate including ibi inter-beat interval photoplethysmogram ppg green, infrared ir , and red skin temperature [on-demand tracker types] the following tracker types are on-demand tracker types use only one on-demand tracker type at a time and only when needed bioelectrical impedance analysis bia electrocardiogram ecg ppg green, infrared ir , and red skin temperature spo2 blood oxygen [other] measuring the user’s sweat loss amount after a running is available with the following tracker type sweat loss developer mode a developer mode is supported for testing and debugging see the developer mode for more information restrictions the emulator is not supported data measured by the samsung health sensor sdk is for fitness and wellness information only, not for the diagnosis or treatment of any medical condition changes 1 3 0 - september 22, 2024 rebranding the sdk name to "samsung health sensor sdk" 1 3 0 - august 22, 2024 [new] continuous and on-demand enum constant names of healthtrackertype have been defined accelerometer_continuous bia_on_demand ecg_on_demand heart_rate_continuous ppg_continuous ppg_on_demand skin_temperature_on_demand spo2_on_demand an application can track one or more ppgtypes with ppg_continuous or ppg_on_demand the following api has been added healthtrackingservice gethealthtracker healthtrackertype, set<ppgtype> the following ppg types have been added ppgtype green ppgtype ir ppgtype red valuekey ppgset has been added it includes ppg green, ir, red data the following fields for bia’s raw data have been added in valuekey biaset body_impedance_degree body_impedance_magnitude [deprecated] the following enum constant names of healthtrackertype have been deprecated accelerometer use accelerometer_continuous bia use bia_on_demand ecg use ecg_on_demand heart_rate use heart_rate_continuous ppg_green use ppg_continuous ppg_ir use ppg_on_demand ppg_red use ppg_on_demand skin_temperature use skin_temperature_on_demand spo2 use spo2_on_demand the following ppg data set of valuekey have been deprecated use valuekey ppgset instead of them valuekey ppggreenset valuekey ppgirset valuekey ppgredset [removed] the following fields of valuekey ecgset have been removed use alternative fields valuekey ecgset ecg use valuekey ecgset ecg_mv valuekey ecgset max_threshold use valuekey ecgset max_threshold_mv valuekey ecgset min_threshold use valuekey ecgset min_threshold_mv the following fields of valuekey heartrateset have been removed use alternative fields valuekey heartrateset heart_rate_ibi use valuekey heartrateset ibi_list valuekey heartrateset status use valuekey heartrateset heart_rate_status and valuekey heartrateset ibi_status_list 1 2 0 - august 30, 2023 [new] the skin temperature tracker type and data point set have been added skin temperature can be measured on-demand or as a batching event for more information, see the api reference healthtrackertype skin_temperature healthtrackertype skin_temperature_continuous valuekey skintemperatureset the following interfaces for values in millivolts have been added to the ecg data point set ecg_mv max_threshold_mv min_threshold_mv the following interfaces for heart rate status and ibi-related information have been added to the heart rate data point set valuekey heartrateset heart_rate_status valuekey heartrateset ibi_list valuekey heartrateset ibi_status_list the status interface has been added to the following data point sets valuekey accelerometerset status valuekey ppggreenset status valuekey ppgirset status valuekey ppgredset status [change] the error description of the first bit in the 1 ~ 127 value for valuekey sweatlossset status has been updated [deprecated] the following interfaces in the ecg data point set have been deprecated valuekey ecgset ecg, replaced by valuekey ecgset ecg_mv valuekey ecgset max_threshold, replaced by valuekey ecgset max_threshold_mv valuekey ecgset min_threshold, replaced by valuekey ecgset min_threshold_mv the following interfaces in the heart rate data point set have been deprecated valuekey heartrateset heart_rate_ibi, replaced by valuekey heartrateset ibi_list valuekey heartrateset status, replaced by valuekey heartrateset heart_rate_status and valuekey heartrateset ibi_status_list [removed] valuekey heartrateset flag has been removed 1 1 0 - march 31, 2022 minor stability improvements have been made to the sdk library 1 1 0 alpha - march 17, 2022 [new] the spo2 tracker type and data point set have been added, which are supported by health platform v1 3 0 healthtrackertype spo2 valuekey spo2set valuekey heartrateset status has been added, which replaces valuekey heartrateset flag [changes] the trackingsampleapp application code has been updated [deprecated] valuekey heartrateset flag has been deprecated 1 0 0 - feb 25, 2022 the values for sweatlossset status have changed for more information, see the api reference 1 0 0 beta1 - dec 31, 2021 minor issues related to the sweat loss feature have been fixed 1 0 0 alpha3 - dec 17, 2021 [new] the sweat loss feature has been added, which measures how much sweat is lost during a run the following interfacess have been added datatype enum exercisestate enum exercisetype enum healthtrackertype sweat_loss enum vale healthtrackingservice gethealthtracker healthtrackertype healthtrackertype, trackeruserprofile userprofile, exercisetype type api valuekey sweatlossset class [known issue] the following issues are to be resolved in february 2022 watch software update a timestamp period variation issue in received sensor data for accelerometer, heart rate and ppg grenn an issue where healthtracker trackereventlistener onflushcompleted is not received 1 0 0 alpha2 - july 28, 2021 [change] the sdk policy has been applied tracking watch sensor data with the sdk is available only for the tracking types within the registered scope if sdk_policy_error occurs, talk to your samsung contact point the following interfaces have been added to the tracking data point sets the bia status has been defined valuekey biaset status check this value after a bia measurement if the status indicates an error, guide the user with a message and appropriate ui the ecg’s lead on/off values have been defined valuekey ecgset lead_off the flag for heart rate measurement has been added valuekey heartrateset flag in healthtracker trackererror the following unused errors have been removed low_signal movement_detected not_wearing time_out the following error has been added sdk_policy_error measurement guides for each sensor data have been added to the programing guide
tutorials galaxy watch
blogas wearable technology becomes more mainstream, customized smartwatch faces can be an extension of users’ style and personality. with samsung’s watch face studio (wfs) tool, you can design custom watch faces for devices in the wear os smartwatch ecosystem, such as galaxy watch4 and newer smartwatches. after you have made your unique watch face, you can share it with a global audience by uploading it to the google play store. this article describes the basic steps to distribute your watch face through the google play store, such as registration, testing, and publication. to register your watch face in google play, you must have a google play developer account. create a watch face in wfs, design and create your watch face. the wfs interface allows you to easily add and customize watch face components and add theme colors to implement multiple color schemes, for example. as you create a watch face, you can preview it with the “preview” window in wfs or install it on your own smartwatch. if do not have access to a supported smartwatch, you can test your watch face in the remote test lab, which gives you remote access to a variety of samsung galaxy watch devices. because smartwatches have limited hardware, you must be mindful of the amount of memory used by the watch face. the watch face specification defined by google has memory usage limits. to avoid issues related to these memory usage policies, wfs versions 1.6.9 beta and higher support a memory usage plugin that easily estimates the memory use of your watch face. notethe results from the plugin are not guaranteed to match the actual memory capacity check results from google play. figure 1: memory usage plugin prepare screenshots use the “preview” window in wfs to capture screenshots of your watch face in various sizes. you need these to register your watch face in google play. to create watch face screenshots: in the “preview” window, set the watch face to show the screen you want to capture. open the dropdown menu next to the camera icon and select the screenshots you want to create. click the camera icon. the screenshots are saved in the “screenshots” folder within your project folder. figure 2: screenshot creation generate the watch face package watch face projects are bundled into package files for publication. the google play store requires an aab file, while the galaxy store (for china only) requires an apk file. you can generate either or both in wfs: in the wfs project screen, select publish. define the unique package name, location for the generated file, version name and code, and package type. by default, the generated file is located in your project folder: “c:\users\username\watchfacestudio\build\project_name\” (windows) or “/users/username/watchfacestudio/build/project_name/” (macos). figure 3: watch face file generation you must also have a valid keystore used to sign the package file: if you have previously created a keystore, enter its information. if you do not have a keystore, select create new key. in the “new keystore” dialog, define the required details and click ok. figure 4: keystore creation when you are ready to generate the watch face package, in the “publish” dialog, click ok. noteremember that the key alias password and the keystore password must be identical. a warning dialog pops up if you use different passwords. register the watch face to register your watch face application in google play, sign in to your google play developer account. in the google play console, select all apps > create app and fill in the required information, such as the name, default language, and if the watch face is to be free or paid. you must also include any necessary disclosures. you can modify this information later, as needed. test the watch face before your watch face can be made available to the public, you must test it with actual users. testing, internal (recommended) and closed (required), ensures that your watch face behaves according to your design and complies with google play content policies and quality guidelines. for information about the google play content policies and application quality guidelines, see prepare your app for review and wear os app quality. you can easily monitor the testing status, number of installations and users, update status, and more for your applications through the google play dashboard. internal testing you can quickly distribute your builds to a limited number of trusted testers for their feedback. while internal testing is optional, it is strongly recommended. to set up your watch face for internal testing: in the google play console, select view app for the watch face that you want to test. its dashboard page opens. from the side menu, select testing > internal testing. since you have developed a watch face, you must select the wear os form factor. open the dropdown menu next to “create new release” and select manage form factors. in the “form factors” section, add wear os. figure 5: form factor selection unfold the “view tasks” list in the “set up internal testing track” section. the list guides you through the test setup process. for example: completing application setup in google play, such as defining the name and description to be displayed in the google play store uploading the required images for the google play store, such as its icon, screenshots, and feature graphics defining up to 100 internal testers for your application; the list can be modified later, as needed in the "create a new release" task: a. upload the aab file you want to test. you are prompted to sign the file by selecting or creating a signing key. b. name the release and add an optional release note. select preview and confirm the release. google play automatically checks for possible issues, such as missing information. to resolve the issues, follow the instructions for each list item. figure 6: issues list when you are ready to start the test, select start rollout to internal testing. distribute the test link or email invitations to your testers. the test link can take a few hours to become available. closed testing you can get targeted feedback from a wider group of users that you select, without affecting your public ratings and reviews. closed testing also sends your application to google to check for policy compliance before distributing it to your testers. noteif you have a personal google play developer account created after november 13, 2023, you need at least 20 testers to participate in your application’s closed test for a minimum of 14 days before you can apply for access to production. setting up a closed test is similar to setting up an internal test: in your watch face’s dashboard page in the google play console, go to testing > closed testing. to create a closed testing track, select create track and define a name for the testing track. open the dropdown menu next to “create new release” and select wear os only. complete the tasks in the “set up closed testing track” section, such as defining the countries where the application is to be available and the list of testers. figure 7: closed testing setup in the “create a new release” task, select an application package file that you have previously uploaded, or upload a new one. name the release and add an optional release note. select preview and confirm the release and resolve any detected issues. select send the release to google for review. when the release is approved, you can share the testing link with your testers. for more information on creating and managing tests, see set up an open, closed, or internal test. publish the watch face when you have completed closed testing and your watch face is ready to publish, apply for access to production. when access is approved, the watch face is available publicly in the google play store. summary it is easy to transform your watch face concept from design to published product. create the watch face with watch face studio, register it in the google play console and conduct user tests, then publish it in the google play store to share it with the world. if you have questions or need help with the steps presented in this article, you can share your queries on the samsung developers forum. you can also contact us directly for more specialized support through the samsung developer support portal.
Most Fowziya Akther Houya
Learn Code Lab
codelabtransfer heart rate data from galaxy watch to a mobile device objective create a health app for galaxy watch, operating on wear os powered by samsung, to measure heart rate and inter-beat interval ibi , send data to a paired android phone, and create an android application for receiving data sent from a paired galaxy watch overview with this code lab, you can measure various health data using samsung health sensor sdk and send it to a paired android mobile device for further processing samsung health sensor sdk tracks various health data, but it cannot save or send collected results meanwhile, wearable data layer allows you to synchronize data from your galaxy watch to an android mobile device using a paired mobile device allows the data to be more organized by taking advantage of a bigger screen and better performance see samsung health sensor sdk descriptions for detailed information set up your environment you will need the following galaxy watch4 or newer android mobile device android studio latest version recommended java se development kit jdk 17 or later sample code here is a sample code for you to start coding in this code lab download it and start your learning experience! heart rate data transfer sample code 213 7 kb connect your galaxy watch to wi-fi go to settings > connection > wi-fi and make sure that the wi-fi is enabled from the list of available wi-fi networks, choose and connect to the same one as your pc turn on developer mode and adjust its settings on your watch, go to settings > about watch > software and tap on software version 5 times upon successful activation of developer mode, a toast message will display as on the image below afterwards, developer options will be visible under settings tap developer options and enable the following options adb debugging in developer options find wireless debugging turn on wireless debugging check always allow on this network and tap allow go back to developer options and click turn off automatic wi-fi notethere may be differences in settings depending on your one ui version connect your galaxy watch to android studio go to settings > developer options > wireless debugging and choose pair new device take note of the wi-fi pairing code, ip address & port in android studio, go to terminal and type adb pair <ip address> <port> <wi-fi pairing code> when prompted, tap always allow from this computer to allow debugging after successfully pairing, type adb connect <ip address of your watch> <port> upon successful connection, you will see the following message in the terminal connected to <ip address of your watch> now, you can run the app directly on your watch turn on developer mode for health platform to use the app, you need to enable developer mode in the health platform on your watch go to settings > apps > health platform quickly tap health platform title for 10 times this enables developer mode and displays [dev mode] below the title to stop using developer mode, quickly tap health platform title for 10 times to disable it set up your android device click on the following links to setup your android device enable developer options run apps on a hardware device connect the galaxy watch with you samsung mobile phone start your project in android studio, click open to open an existing project locate the downloaded android project hrdatatransfer-code-lab from the directory and click ok you should see both devices and applications available in android studio as in the screenshots below initiate heart rate tracking noteyou may refer to this blog post for more detailed analysis of the heart rate tracking using samsung health sensor sdk first, you need to connect to the healthtrackingservice to do that create connectionlistener, create healthtrackingservice object by invoking healthtrackingservice connectionlistener, context invoke healthtrackingservice connectservice when connected to the health tracking service, check the tracking capability the available trackers may vary depending on samsung health sensor sdk, health platform versions or watch hardware version use the gettrackingcapability function of the healthtrackingservice object obtain heart rate tracker object using the function healthtrackingservice gethealthtracker healthtrackertype heart_rate_continuous define event listener healthtracker trackereventlistener, where the heart rate values will be collected start tracking the tracker starts collecting heart rate data when healthtracker seteventlistener updatelistener is invoked, using the event listener collect heart data from the watch the updatelistener collects datapoint instances from the watch, which contains a collection of valuekey objects those objects contain heart rate, ibi values, and ibi statuses there's always one value for heart rate while the number of ibi values vary from 0-4 both ibi value and ibi status lists have the same size go to wear > java > data > com samsung health hrdatatransfer > data under ibidataparsing kt, provide the implementation for the function below /******************************************************************************* * [practice 1] get list of valid inter-beat interval values from a datapoint * - return arraylist<int> of valid ibi values validibilist * - if no ibi value is valid, return an empty arraylist * * var ibivalues is a list representing ibivalues up to 4 * var ibistatuses is a list of their statuses has the same size as ibivalues ------------------------------------------------------------------------------- * - hints * use local function isibivalid status, value to check validity of ibi * ****************************************************************************/ fun getvalidibilist datapoint datapoint arraylist<int> { val ibivalues = datapoint getvalue valuekey heartrateset ibi_list val ibistatuses = datapoint getvalue valuekey heartrateset ibi_status_list val validibilist = arraylist<int> //todo 1 return validibilist } check data sending capabilities for the watch once the heart rate tracker can collect data, set up the wearable data layer so it can send data to a paired android mobile device wearable data layer api provides data synchronization between wear os and android devices noteto know more about wearable data layer api, go here to determine if a remote mobile device is available, the wearable data layer api uses concept of capabilities not to be confused with samsung health sensor sdk’s tracking capabilities, providing information about available tracker types using the wearable data layer's capabilityclient, you can get information about nodes remote devices being able to consume messages from the watch go to wear > java > com samsung health hrdatatransfer > data in capabilityrepositoryimpl kt, and fill in the function below the purpose of this part is to filter all capabilities represented by allcapabilities argument by capability argument and return the set of nodes set<node> having this capability later on, we need those nodes to send the message to them /************************************************************************************** * [practice 2] check capabilities for reachable remote nodes devices * - return a set of node objects out of all capabilities represented by 2nd function * argument, having the capability represented by 1st function argument * - return empty set if no node has the capability -------------------------------------------------------------------------------------- * - hints * you might want to use filtervalues function on the given allcapabilities map * ***********************************************************************************/ override suspend fun getnodesforcapability capability string, allcapabilities map<node, set<string>> set<node> { //todo 2 } encode message for the watch before sending the results of the heart rate and ibi to the paired mobile device, you need to encode the message into a string for sending data to the paired mobile device we are using wearable data layer api’s messageclient object and its function sendmessage string nodeid, string path, byte[] message go to wear > java > com samsung health hrdatatransfer > domain in sendmessageusecase kt, fill in the function below and use json format to encode the list of results arraylist<trackeddata> into a string /*********************************************************************** * [practice 3] - encode heart rate & inter-beat interval into string * - encode function argument trackeddata into json format * - return the encoded string ----------------------------------------------------------------------- * - hint * use json encodetostring function **********************************************************************/ fun encodemessage trackeddata arraylist<trackeddata> string { //todo 3 } notetrackeddata is an object, containing data received from heart rate tracker’s single datapoint object @serializable data class trackeddata var hr int, var ibi arraylist<int> = arraylist run unit tests for your convenience, you will find an additional unit tests package this will let you verify your code changes even without using a physical watch or mobile device see the instruction below on how to run unit tests right click on com samsung health hrdatatransfer test , and execute run 'tests in 'com samsung health hrdatatransfer" command if you have completed all the tasks correctly, you will see all the unit tests pass successfully run the app after building the apks, you can run the applications on your watch to measure heart rate and ibi values, and on your mobile device to collect the data from your watch once the app starts, allow the app to receive data from the body sensors afterwards, it shows the application's main screen to get the heart rate and ibi values, tap the start button tap the send button to send the data to your mobile device notethe watch keeps last ~40 values of heart rate and ibi you’re done! congratulations! you have successfully achieved the goal of this code lab now, you can create a health app on a watch to measure heart rate and ibi, and develop a mobile app that receives that health data! if you face any trouble, you may download this file heart rate data transfer complete code 213 9 kb to learn more about samsung health, visit developer samsung com/health
tutorials galaxy watch
blogwatch face studio is a graphic authoring tool that helps you to design watch faces for the wear os smartwatch ecosystem, including galaxy watch4 and galaxy watch5. it is an intuitive graphic tool which allows you to design watch faces without coding. watch face studio includes a notable feature known as a complication. using complications, the user can get a glanceable unit of information for their selected application on their watch face. the complications can display data, such as text, title, image, or icon, which is collected from the applications that provide such information. today, i discuss some complication features in this blog. i design a simple watch face to demonstrate these. for simplicity i add a digital time and a digital date. for complications, i add one short text complication and one ranged value complication. at the end, two different theme colors are applied. you can download this sample design from here and throughout this blog you can follow me. after deploying the watch face on a watch and customizing the complication, the watch face on the real device looks the same as figure 1. figure 1: the watch face demonstrated in this blog getting started to view and deploy the sample design from my blog, watch face studio must be installed on your pc. now , i create a new project and then add basic components for simplicity. i add time and date from digital clock and place them in the center. adding complications as i have said earlier, i use two different complications in this design. to add complications, go to the add component menu on the top middle. from the dropdown menu, add the "short text" complication. for more information about complications, visit this complication document. short text complication first, i add a short text complication. for design purposes, i adjust the complication placement as (x and y) 170 and 45. i leave the dimension and color as it is. however, you can resize the dimension and change the color of the components of the selected complication. now i set the properties of complication settings as follows: complication type: i set it as "editable" so that anyone can customize the complication from their watch. if the type is set as "fixed," then the complication cannot be customized from the watch and it remains the same as what is provided in the design. for example, i choose "sunrise sunset" from the default provider > dropdown menu (see figure 2a). if the default provider is set as > "empty," no complication is displayed in the run window. note : if the default provider is set as "empty," customization from the watch is still possible. complication layout: the layout for this complication is set to the default ("icon + text + title"), but the layout also can be changed to the designer's preference. in figure 2b, the other layout options for the short text complication are displayed. you can find more details about the complication layout from my things to consider when designing complication layouts blog. (a) default provider options (b) layout options figure 2: complication settings ranged value complication now, i add a ranged value complication and adjust the properties as displayed in figure 3. i select the default provider as "watch battery" for this complication. i set the complication type to "fixed" so that the customization from the watch is not possible. figure 3: ranged value properties, "watch battery" is fixed and cannot be changed on the watch for this complication watch face studio gives the opportunity to change the properties for every component of the complication. now, i modify the properties of the progress bar component of the ranged value complication. so, at first, i expand the ranged value complication. an example of this is displayed in figure 4. figure 4: expand the ranged value complication to change the properties, i click on the progress bar under the ranged value complication to display its properties. i change the color of the progress bar by following the steps below: a. click the color box in the color menu. b. select a color from the color picker pop-up window. c. click ok in the color picker pop-up window. figure 5: ranged value progress bar color change figure 6: ranged value complication added i have added two complications in two different positions on the watch face. keep in mind that currently, only one complication can be set in one spot. so only one complication must be set in the same area regardless of normal or always-on-display (aod). for example, i add two same or different complications in the same position. i set one complication for normal mode and another complication for aod mode. now, i can set two different complication providers and test them on the run window for the normal and aod modes. but it is not possible to customize both the complications on the watch as the complications overlap each other. therefore, it is better not to use two complications in one spot. adding a theme color to a complication now, i add two theme colors and apply one of them to the short text complication. the steps to add and apply a color are given below: a. go to the style tab. the tab contains the theme color palette menu to choose the theme color**.** b. add a color by clicking the "+" icon. c. the color picker pop-up window opens. select a color from the available options. d. click ok for confirmation. note : you can add as many colors as required by repeating steps a to d. e. now set the theme color for the short text complication. a "fill with color" icon is present for every selected component. click the fill with color icon for the short text complication title, text, and the icon. f. on the run window, the theme color menu is displayed which contains all the selected theme colors from the style tab. choose any color by selecting the checkbox and view the output in the run preview. g. for the short text complication, the theme color is set and the color for the title, text, and icon is changed. figure 7: add theme color for short text complication note : the theme color can be customized from the watch. theme color on a watch on the watch, i can choose a theme color from the available colors that i had added in the project earlier. the theme color is set on every component of the short text complication. however, in the case of the icon and image of the complication, the theme color is applied after converting the original color to grayscale. this is because we do not know the color that is provided by the complication provider. that is why it is converted into grayscale first, before applying the theme color. so be careful about setting the theme color while designing your watch face, as the icon and image colors may interfere with the theme color. for example, from the watch, if i set a short text complication as "sunrise sunset," the icon color of this complication is orange (for sunset). on the other hand, if i set the complication as "weather," the icon color is white. see figure 8 for better understanding. in figure 8a, the icon color for "sunrise sunset" is orange and this color is provided by the provider. therefore, if i apply the theme color on this icon, the icon color is not the exact same theme color as displayed in figure 8b. in another scenario, the provided icon color is white which is as displayed in figure 8c. in this case, if the theme color is applied on the icon, the color is perfectly changed as the theme color. in figure 8d, this case is displayed. (a) "sunrise sunset" complication icon without theme color (b) "sunrise sunset" complication icon after applying theme color (c) "weather" complication icon without theme color (d) "weather" complication icon after applying theme color figure 8: the icon color interference with the theme color deploying the design and customizing complications as your own our target components are added. to view the watch face featured in this blog, download this file and deploy it to your watch by following these steps: connect your watch to watch face studio. for information about connecting, see connection guideline. deploy the design on your watch using run on device. for more details on connection, visit this test guideline. note : as per faq 12, "debug over bluetooth" is not yet supported in galaxy watches with galaxy wearable. 3. customize the complications on the watch. figure 9: designed watch face on a watch figure 9 displays the customized complications. to learn more about complications, visit watch face complications. conclusion as you can see, using complications, you can get detailed information for the selected application on your watch. personalization is a key feature of galaxy watch. you can continue to enjoy customizing the look of your watch style as you develop your collection of watch faces. resources in the samsung developer forum, you can ask and get help for any issue. this is a very active and friendly community where developers discuss their issues. there are many blogs on different topics, including watch face studio, on the samsung developers site. please visit these galaxy watch tutorials to expand your knowledge about samsung galaxy watch and their special features. if you want to develop watch faces programmatically, you can use android studio. you can do more complex operations using the complication api.
Most Fowziya Akther Houya
featured
bloganother year will soon be past and, like many of you, we’re looking forward to next year. we’ll be taking some time the next few weeks to be with our families, and will be back in 2022 with more blogs, podcasts, product announcements, and ways for you to succeed with galaxy store and samsung platforms. with the end-of-year holidays upon us, we’re stopping to reflect on what we did in 2021. even with covid making a disruption in everyone’s lives, we’re still here to help developers find answers and hopefully, also find success. here are some of our most memorable moments. 10. developer portal refresh brought a modern look and support for mobile we’ve been working for several years to bring samsung’s developer portal into a single web infrastructure. we moved content from multiple servers and cloud services into a cms that uses open standards and a responsive design for mobile devices. we pored through a decade of content to make sure it was still timely and accurate for your needs today. we integrated the developer forums to use the same samsung account login for both the developer portal and seller portal to give you a more seamless experience. in october of this year, we made a ux refresh to the site and the most amazing thing is how easy that process went. there were no late nights in the weeks prior to launch. we were able to test the new ux in a sandbox rigorously. then the deployment to production happened almost instantaneously. we spent less time worrying about our website and more time creating the content you need to do your work. we understand how important the samsung developer portal is to you and your work. that’s why we took the time to ensure a smooth transition as we made major infrastructure changes. 9. monthly updates keep developers up-to-date on new galaxy store features the galaxy store product management team began publishing monthly newsletters to enlighten developers of the latest features and improvements to seller portal. these updates also usually appear as blog posts in the first week or two of the month. some of the major announcements include: staged app rollouts (october) local currencies in settlement and financial reports (september) private beta testing (july) galaxy store developer api (april) look for more exciting improvements in 2022 as galaxy store continues to innovate. 8. unpacked events bring exciting new product announcements galaxy unpacked in january 2021 brought announcements of the galaxy buds pro, galaxy s21, and the new galaxy smarttag. the event highlighted samsung’s design concepts with one ui 3 and integrated experiences from partners like microsoft and google. the august galaxy unpacked event brought announcements of galaxy z fold3 and galaxy z flip3 phones. these devices have many new hardware and software features for developers to build upon. this blog post highlighted many of the ways that developers can implement features supporting flex mode and s pen remote, while ensuring that users have a seamless experience with app continuity. the most anticipated announcement of the august galaxy unpacked event was the unveiling of galaxy watch4, featuring wear os, powered by samsung. as with the tizen-powered galaxy watch devices, samsung released a new tool, galaxy watch studio converter, to help existing designers bring their watch faces to wear os. designers could also start a new watch face project from scratch with the newly-released watch face studio tool. 7. remote test lab updates allow developers to experience the latest hardware as new devices are announced, developers can use the remote test lab (rtl) to ensure that their apps work properly on the new version of one ui as well as different screen resolutions and pixel densities. in 2021, the rtl development team added support for foldables and galaxy s21 devices, allowing developers to ensure their apps work correctly before the devices are available to consumers. the rtl team also added support for android studio. in september, thousands of devices were added in data centers around the world to ensure that a compatible device is always available. as part of this release, rtl was re-engineered to work exclusively in the chrome browser, so that no external software is needed to test apps on all the latest devices. 6. samsung developer forums activity the samsung developer forums, based on the popular open-source discourse project, were introduced in january 2020, replacing an aging forum infrastructure that didn’t work well on mobile devices. by using the same samsung account authentication method as the samsung developers site, we’re able to provide a nearly-seamless experience across different hosts and platforms. since their introduction, we’ve seen large numbers of visitors stop by the forums with questions. community manager ron liechty has more than 25 years of experience in managing healthy communities—his knowledge and guidance keeps the forums a useful resource for developers. some of these visitors have become our best community members, providing valuable feedback to their peers as well as helping to moderate spam and malicious content. 5. supporting game developers in 2021 games are a noticeable part of the galaxy store experience and we work with many partners and internal teams to ensure that gamers have a great experience on galaxy devices. the galaxy gamedev team works closely with some of the top publishers and developers to improve performance of top titles on mobile. this team creates tools that provide great detail on the performance of the cpu and gpu during intense moments of gameplay. the gamedev team then documents their efforts in a series of best practices and blog posts to help developers everywhere. in addition to our internal team work, we frequently work with our partners at arm to deliver relevant content for game developers. this summer, we published and promoted a number of educational articles, webinars, and training series in cooperation with the arm developer team. best practices for mobile game developers and artists new vulkan extensions for mobile: maintenance extensions new vulkan extensions for mobile: legacy support extensions new game changing vulkan extensions for mobile: descriptor indexing new game changing vulkan extensions for mobile: buffer device address new game changing vulkan extensions for mobile: timeline semaphores mike barnes from the gamedev team, together with eric cloninger from the samsung developers team, presented at the virtual gdc2021 event in july. gdc is an important event for all of us at samsung and we hope to see you all there at the live event in march 2022. 4. new voices appeared on samsung developers podcast, season 2 shortly before the covid-19 pandemic changed our lives, tony morelan from samsung developers attended a podcasting event and came back to the office inspired to start a podcast. he lined up guests from internal teams and important partners. everyone had a great time participating and it gave us a way to continue delivering quality content to developers. as 2020 turned to 2021, we continued bringing interesting guests from across the mobile design and development ecosystem. we used the podcast to talk about the upcoming virtual samsung developer conference and chat with the people that made the event a success. here are some of the highlights from season 2 of the samsung developers podcast: drazen stojcic, urarity – watch faces, design tan nguyen, butterfly-effected gmbh – galaxy themes, marketing, licensing the samsung internet advocacy team – web standards, privacy, foldable devices we’re still hoping for a return to days where we can travel and meet in person, but until that time comes, please join us in listening to these industry veterans and top developers on the samsung developers podcast. season 3 begins in early 2022. 3. blog series instructs readers on design and successful marketing without live events the past two years, we have searched for new ways to continue delivering timely and helpful advice to mobile app designers and developers. as mentioned previously, we worked with arm this year to bring great technical content front and center. we also worked with our network of top designers, developers, and thought leaders on concepts that will help you succeed on galaxy store and in creating better experiences for your users: better for all – in this blog series, we talked with leading designers and experts to help understand the increasingly important concepts behind the diversity, equality, and inclusion movement. this series discussed aspects of language used in apps, themes, and watch designs. it also highlights important guidelines to ensure apps and web sites are accessible to users with sight, mobility, and hearing impairments. better for all: mobile accessibility better for all: inclusive policies with daniel appelquist better for all: equal accessibility better for all: bringing diversity to design with eglantina hasaj and manpreet kaur better for all: diversity in design better for all: developing and designing for diversity refresh for success – it’s not enough to simply submit a title to a digital marketplace and assume success will follow and continue without extra effort. in this series, top galaxy store designers and developers talk about how they maintain their product lines to ensure a steady flow of revenue and new customers. refresh for success: maintain quality themes design with olga gabay from zeru studio refresh for success: improve your process to keep designs fresh with tan nguyen from butterfly-effected, gmbh refresh for success: improve your process and de-clutter your galaxy store with drazen stojcic from urarity prime time design – finding success in designing new products is an intensely unique and personal process. the prime time design series includes interviews with some of the most unique people creating for galaxy store. read how these talented people inspire themselves and how they convert that inspiration into action. prime time design: unpacking the creative process with ramon campos from friss in motion prime time design: unpacking the creative process with pedro machado from health face prime time design: unpacking the creative process with john shih from x9 studio strategies for success – tony morelan was a successful watch face designer before coming to work with the samsung developers team. we’re grateful for his knowledge of design as well as how to turn designs into revenue. in this four-part series, tony points out steps to creating successful galaxy store product submissions. strategies for success: selling your apps strategies for success: understanding consumer trends strategies for success: building your fan base strategies for success: making your brand successful 2. best of galaxy store awards highlight successful developers the galaxy store app on your mobile device is more than just an app. behind the scenes, there is a team of developers, product managers, business leaders, and security experts devoted to ensuring the best possible online experience for consumers in 180 countries. because of their dedication, developers and designers have a great platform for monetizing their work. each year, the samsung developers team works with the galaxy store operations and business development teams to determine the best games, apps, and themes based on revenue, downloads, and impact to consumers. the result is the best of galaxy store awards. in 2018 and 2019, the best of galaxy store awards were presented live, on stage, at the samsung developer conference (sdc). without a live event in 2020 or 2021, the samsung developers team decided to continue the tradition of highlighting and awarding our top galaxy store products. even without an in-person event, we used a live premiere on youtube to have a single moment in time to celebrate with the winners. tony morelan emceed the event, but he had a lot of help from ron liechty, jeanne hsu, susie perez, and shelly wu. we thank them for their hard work. we hope you’ll enjoy watching! look for the “best of galaxy store” sash on apps, games, themes, and watch faces in galaxy store to know that you’re getting a truly unique experience. 1. discovering new opportunities at sdc21 each year, the samsung developer conference is the culmination of an incredible amount of planning and work by hundreds of people. even though the event was virtual in 2021, there was still a huge volume of work. instead of preparing for a live audience, our teams practiced in front of a galaxy phone on a tripod (really). instead of building booths and planning meals, we built a website and social media campaigns to reach a larger audience. eric cloninger and tony morelan kicked off the promotion for sdc21 with a podcast featuring a previous sdc speaker, chris shomo. before the conference, visitors were invited to create whimsical caricatures of themselves using the mysdcstack mini-site and submit their designs to social media. by participating in the event website, watching sessions, and trying the code labs, visitors would earn points toward a prize drawing after sdc. relive the experience of sdc21 by watching the keynote or any of the highlight sessions and technical talks by viewing this playlist wrapping up when sdc is finished, our team takes a collective deep breath, happy to be done. it is a satisfying experience to pull off a big industry event. we don’t know yet how we’ll handle live events, but we remain optimistic that some will occur. we are making plans and we hope we’ll be able to see you, somewhere, in 2022. 🤞 take care. stay warm (or cool). best wishes to you all and happy new year!
tutorials galaxy watch, marketplace
blogwith the release of one ui watch version 4.5, there are new steps for installing galaxy watch4 and galaxy watch5 watch faces that are different from the previous post on this topic. new and previously purchased watch faces from google play store will not automatically become the active watch face on your watch. in some cases, you must first download watch faces to your play store account before transferring them to your watch. the steps below explain how to install watch faces using your watch, phone, or computer browser. your devices should be logged into the same google account and on the same wifi to ensure they are correctly connected. new watch faces purchase and install using your watch purchase and install using your phone purchase and install using your computer browser previously purchased watch faces install previous purchase using your watch install previous purchase using your phone install previous purchase using your computer browser troubleshooting getting help new watch faces purchase and install using your watch 1. swipe up on your watch to view your watch apps and tap the play store app. 2. use the search function to find watch faces based on keywords, or scroll down and tap the watch faces banner to view featured watch faces. 3. tap on the chosen watch face. 4. tap on the price button. 5. a notification to complete your purchase on your phone will appear on your watch. if this device appears in the list, the developer offers a companion app for your phone for this watch face. companion apps are not required for watch faces to function correctly on your watch. 6. on your phone, go to the play store. a. tap on your profile icon b. tap on notifications & offers c. tap on continue your purchase to complete the transaction your new watch face will download to your play store account. even though the payment successful notification states that your new watch face is now available on your watch, it still must be transferred to your watch. 7. tap on available on more devices and tap the install button for your watch model. 8. once your watch face downloads to your watch, click on the current watch face, swipe left, and select add watch face. continue swiping left until you see your newly downloaded watch face. finally, tap the watch face to make it your active watch face. purchase and install using your phone 1. open the galaxy wearable app and tap either the watch faces button or the store button to launch the play store. if you tap watch faces, you need to scroll to the bottom and select get more watch faces to launch the play store. 2. if you arrive at the play store home screen, you must navigate to the watch face page. tap either the featured watch faces banner or scroll to the bottom and tap watch faces to open the watch face page. alternatively, you can open the play store on your phone but must tap the categories tab near the top and select the watch faces category. 3. navigate through the many options of watch faces within different categories, or use the search function to search using a keyword. 4. select a watch face and tap the dropdown arrow button in the green price bar. if the dropdown doesn't appear, confirm that your phone and watch are connected, then close and re-open the play store app on your phone. you may also need to turn off the wifi on your watch and then turn wifi back on. 5. tap on the checkmark box for your watch to select it, then tap on the green bar app price. 6. add payment information if needed or redeem a coupon code by tapping on the current payment choice, scrolling down, and selecting redeem code. 7. tap on the 1-tap buy green bar button to complete your purchase. your watch face downloads to your phone and then installs on your watch. downloading may take several minutes, and the status may not change from install pending. 8. you can check the progress of your download by tapping the download icon at the bottom of your current watch face. some purchases may take several hours to sync with your watch. if you have initiated your purchase using your phone, do not attempt to purchase again using your watch. 9. once your watch face has downloaded to your watch, make the watch face your active watch face by going to the galaxy wearable app on your phone and select watch faces. 10. scroll down to the downloaded category and tap on your recently downloaded watch face to add it to your favorites category. 11. your watch face will now be the active watch face on your watch. purchase and install using your computer browser 1. go to https://play.google.com/store/apps and ensure you signed in to your google account associated with your phone. 2. click on the watch category button near the top of the page. 3. click on the featured watch faces banner. 4. navigate through the many options of watch faces within different categories or use the search function to search a keyword. 5. once you have chosen a watch face, click the green buy button and complete your purchase. 6. to transfer your watch face to your watch, select your watch model from the choose a device dropdown and then click install. installing may take several minutes to complete. 7. after your watch face downloads to your watch, click on the current watch face, swipe left, and select add watch face. continue swiping left until you see your newly downloaded watch face. finally, tap the watch face to make it your active watch face. install a previously purchased watch face if you would like to install a watch face that you had previously purchased from the play store, there are different ways you can do this using your watch, your phone, or your computer. install previous purchase using your watch 1. swipe up on the current watch face to access the watch apps and select the play store app. you can also press and hold on to the current watch face, swipe left to the end of the list and select add watch face. continue swiping left until the end and select more watch faces. the play store app will launch. 2. tap the search icon and talk, draw, or type the name of the watch face. 3. select the watch face and tap install. 4. once your watch face downloads to your watch, click on the current watch face, swipe left, and select add watch face. continue swiping left until you see your newly downloaded watch face. finally, tap the watch face to make it your active watch face. install previous purchase using your phone 1. to install a previously purchased watch face using your phone, open the galaxy wearable app and tap either the watch faces button or the store button to launch the play store. if you tap watch faces, you need to scroll to the bottom and select get more watch faces to launch the play store. alternatively, you can directly open the play store by tapping the app icon on your phone. 2. once the play store app has opened, you can view all previously downloaded watch faces by tapping your google account profile icon and selecting manage apps & device. 3. tap on the manage tab and scroll to find the apps for the watch faces you have installed on your phone. 4. select the green installed button and change it to not installed to view apps previously downloaded but not currently installed on your phone. you can also tap the search icon and type the name of your previously purchased watch face. 5. tap on the watch face app from the results list you would like to install on your watch. 6. tap the small downward triangle to open the install options. place a checkmark next to your watch model and click the install button. 7. once your watch face downloads to your watch, click on the current watch face, swipe left, and select add watch face. continue swiping left until you see your newly downloaded watch face. finally, tap the watch face to make it your active watch face. install previous purchase using your computer browser 1. go to https://play.google.com/store/apps and sign in to your google account associated with your phone. 2. click on your profile icon and select library & devices. 3. scroll through the list of previously downloaded apps and select one of your watch faces. if needed, click show more to view your full list of apps. 4. click on the green install on more devices button. 5. in the drop-down menu, click on the device list and select your galaxy watch. 6. click the green install button to install the watch face to your galaxy watch. enter your google account password if asked. 7. your watch face will begin to download to your watch. 8. once your watch face downloads to your watch, click on the current watch face, swipe left, and select add watch face. continue swiping left until you see your newly downloaded watch face. finally, tap the watch face to make it your active watch face. troubleshooting when downloading a watch face to your watch, if your watch device is not showing in the install on more devices list, you will need to use a computer browser to re-install the watch face. 1. log into your play store account and use the search function to find your watch face. 2. click on install on more devices. 3. select your watch model and click install. 4. your watch face will begin to download to your watch. 5. once your watch face downloads to your watch, click on the current watch face, swipe left, and select add watch face. continue swiping left until you see your newly downloaded watch face. finally, tap the watch face to make it your active watch face. getting help for questions about using your watch, open the samsung members app on your phone to visit the community forum. then, view the galaxy watch forum in the wearables category to read discussions and post your questions. to participate in the broader wear os discussion, visit the wear os by google help community page. grow your watch face collection as you can see, there are many ways that you can purchase and install watch faces in google play store onto your galaxy watch. personalization is a key feature of your galaxy watch, and we know you will continue to enjoy customizing the look of your watch style as you grow your collection of watch faces. visit the play store to find your next favorite wear os powered by samsung watch face. to view the watch faces featured in this blog, search the play store for the designer monkey's dream. resources for sellers at samsung galaxy store for more information on signing up and selling on galaxy store, look into the galaxy store documentation. for assistance with setting up and starting your sales campaigns, the galaxy store discussion forums are where you can get great insights from the galaxy store support team and other sellers. join us on twitter, facebook, linkedin, and youtube to continue the discussion.
Tony Morelan
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.