Quantcast
Jump to content


Report

  • Similar Topics

    • By Samsung Newsroom
      The Galaxy Watch has a built-in accelerometer sensor that measures movement or acceleration forces in three dimensions (X,Y, and Z axes). This data is commonly used for tracking movement, detecting gestures, and enabling fitness-related features like sleep tracking, fall detection, step counting, running, and workout tracking.
      The accelerometer measures acceleration along three axes:
      X-axis: Side-to-side movement.
      Y-axis: Forward-and-backward movement.
      Z-axis: Up-and-down movement.
      Figure 1: Axis directions for the accelerometer sensor

      Acceleration is typically measured in meters per second squared (m/s²) or gravity units (g), where 1g = 9.81 m/s².
      This article describes how to read accelerometer sensor data from a Galaxy Watch running Wear OS powered by Samsung and also shows the conversion procedure for the raw data.
      Environment Setup
      Android Studio IDE is used for developing Wear OS applications. The examples in this article use Java, but Kotlin can also be used. Going forward, this article assumes you have already installed the latest Android Studio version on your PC.
      Read Accelerometer Data from Galaxy Watch
      To get accelerometer data, we need to use Android Sensor APIs from the SensorManager library.
      To retrieve accelerometer data from your Galaxy Watch:
      Create a new Wear OS project in Android Studio by selecting File > New Project > Wear OS > Empty Activity > Finish. Set the minimum SDK version to API 30 or higher.
      Add permission to access the sensor into the manifest file (AndroidManifest.xml):
      <uses-feature android:name="android.hardware.sensor.accelerometer" /> You do not need to manually set the runtime permission to access the accelerometer. This permission is granted by default.
      Design your preferred layout (.xml file) to show accelerometer data on the Galaxy Watch screen. This example uses three TextViews in a Constraint Layout to show the output of the three axes of the sensor. You can also check the result in the Logcat window in Android Studio. <TextView android:id="@+id/textViewX" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:text="X" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.207" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/textView2" /> For more detailed code, check the sample application.
      Use the SensorManager library and SensorEventListener to read accelerometer data. To implement them: Initialize the SensorManager library globally: private SensorManager sensorManager; To retrieve android.hardware.SensorManager for accessing sensors, you have to use getSystemService(). sensorManager = SensorManager.getSystemService(Context.SENSOR_SERVICE); As our target is the accelerometer sensor specifically, it is set as the default sensor here. It is recommended to always check the sensor availability before using it in the code. The procedure to do so is explained in this guide.
      To make the accelerometer the default sensor:
      Sensor sensor = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); To get continuous data from your Galaxy Watch, you need to register a listener to notify you if there is new data. This is done using a SensorEeventListener in Android’s Sensor API. sensorManager.registerListener(listener, sensor, SensorManager.SENSOR_DELAY_NORMAL); The listener method onSensorChanged() is called whenever new data is available. The new data is processed in the listener. private SensorEventListener listener = new SensorEventListener() { @Override public void onSensorChanged(SensorEvent sensorEvent) { // for absolute values X = Math.abs(sensorEvent.values[0]); //0 -> X Axis 1-> Y Axis 2 -> Z Axis Y = Math.abs(sensorEvent.values[1]); Z = Math.abs(sensorEvent.values[2]); Log.e("--MainActivityTag--", "X: " + X + "\n" + "Y: " + Y + "\n" + "Z: " + Z); // do whatever you want to do with the data } @Override public void onAccuracyChanged(Sensor sensor, int i) { } }; Here, onAccuracyChanged(Sensor sensor, int i) is a part of the SensorEventListener interface. It is triggered when the accuracy of a sensor changes. However, for the accelerometer, it is called rarely, as the accelerometer data accuracy usually remains constant.
      Unregister the listener when the data collection is over. Otherwise, it can cause unusual battery consumption. Test the Code Sample
      You can check out the sample app (download it using the link below) and try it out on your Galaxy Watch 4 and later.
      AccelerometerDataExample.zip (332.2 KB)
      Run the sample project on your Galaxy Watch. You will see the following screen.
      Figure 2: Output of the sample project (accelerometer data on Galaxy Watch)
      Accelerometer Data Units and Conversion for Galaxy Watch
      In the application end, raw accelerometer data from Galaxy Watch is converted into meters per second squared (m/s²).
      Equation
      raw data * 9.80665 (gravity force) / 4096 (8g rescale)
      Example
      Assume,
      raw_x = raw data received from the sensor
      acc_x = accelerometer data in application end
      if raw_x = 100
      acc_x = 100 * 9.80665 / 4096
      After this, acc_x is received by the application, containing the Acceleration value in m/s².
      Convert the Data into G-Force Units
      The conversion from m/s² to g is: 1 / 9.80665
      So 1 m/s² =0.10197g
      Information about the Accelerometer Sensor
      The accelerometer provides the 3 axis values separately. The sampling rate of the accelerometer is usually a multiple of 50 Hz, but 100 Hz is also supported. The range of the accelerometer is +- 8G. Sampling rate:
      #Maximum Delay: https://developer.android.com/reference/android/hardware/Sensor#getMaxDelay() // 160 msec
      #Minimum Delay: https://developer.android.com/reference/android/hardware/Sensor#getMinDelay() // 10 msec It is always recommended to read calibrated data to avoid unnecessary noise. To get the result in g-force units, you need to divide the accelerometer values by 4096 (along every axis). It is recommended to use a filter while reading any sensor data. Make sure to always unregister the listener and stop all the services after using. Failure to do so can cause excessive battery drain. There are some restrictions of using background services for Galaxy Watch. Conclusion
      For a Galaxy Watch running Wear OS powered by Samsung, accelerometer data is widely used in fitness tracking, fall detection, gesture recognition and motion analysis. Moreover, data conversion enables precise tracking for applications.
      In this article, we’ve seen one of the ways of reading accelerometer sensor data on a Galaxy Watch running Wear OS powered by Samsung. You can also read sensor data using the Samsung Health Sensor SDK. For more details on Samsung Health, check here.
      If you have any questions about or need help with the information in this article, you can reach out to us on the Samsung Developers Forum or contact us through Developer Support.
      View the full blog at its source
    • By Samsung Newsroom
      Samsung Electronics today announced that approximately 80 models in its 2025 TV, monitor and soundbar lineups have received Product Carbon Reduction1 and Product Carbon Footprint2 certifications from TÜV Rheinland, a globally recognized certification organization based in Germany. This marks the fifth consecutive year that the premium lineups, Neo QLED 8K and Neo QLED, have received certifications, reinforcing the company’s continued efforts in carbon reduction.
       
      “Samsung Electronics is committed to driving technological innovation for a sustainable future,” said Taeyong Son, Executive Vice President of Visual Display Business at Samsung Electronics. “As the world’s leading TV manufacturer, we will continue to be at the forefront of establishing a more energy-efficient ecosystem that benefits consumers.”
       
      Following last year’s certification of 60 models across the Neo QLED, OLED and Lifestyle TV categories, Samsung has further increased its number of certified products in 2025 to include QLED TVs. In addition, the company is also working towards obtaining certification for its Color E-Paper lineup later this year.
       

       
      The certifications from TÜV Rheinland are awarded following a rigorous evaluation of a product’s entire lifecycle — including manufacturing, transportation, usage and disposal — based on internationally recognized sustainability standards. By assessing and verifying carbon emissions at each stage, these certifications highlight Samsung’s efforts to reduce environmental impact across its product lineup.
       
      In particular, the Product Carbon Reduction certification is granted to products that have already received a Product Carbon Footprint certification and further demonstrate a measurable reduction in carbon emissions compared to their predecessors.
       
      Samsung’s leadership in energy-efficient display technology dates back to 2021, when the Neo QLED became the first 4K and higher-resolution TV to earn the Reducing CO2 certification. Since then, Samsung has continually expanded its portfolio of environmentally certified products, including QLED, Crystal UHD, Lifestyle TVs, OLED TVs and a wide range of monitors and digital signage products.
       
      For more information on Samsung’s 2025 TV lineup, please visit www.samsung.com.
       
       
      1 38 Certified models include Neo QLED 8K(QN990F, QN950F), Neo QLED 4K(QN90F, QN85F), OLED(S95F 55”/65”, S90F, S85F 77”/83”), The Frame Pro(LS03FW), LCD Signage(QMC 43”, 50”, 55”, 75”), and Soundbar(Q930F, Q800F, QS700F) products.
      1 42 Certified models include Neo QLED 8K(QN900F), Neo QLED 4K(QN80F, QN70F), OLED(S95F 77”/83”, S85F 55”/65”), The Frame(LS03F), QLED(Q8F, Q7F), Viewfinity S80UD, S80D, QMC 65’’/85’’, Soundbar(Q990F), EMDX 32″.
      View the full article
    • By Samsung Newsroom
      Smartwatches have become a part of our daily lives, combining functionality and style in one compact device. With Samsung's Watch Face Studio (WFS), designers can create unique watch faces that are customized to their requirements. Dynamic weather features, which display real-time updates and forecasts on the watch face, are particularly appealing.
      This article covers WFS’s weather features, their uses, and how to create useful weather-themed watch faces. You can create a watch face using weather data as art.
      This article introduces the following weather features which enhance watch face design:
      Weather forecast The last time the weather was updated in ICU format Weather tags You can follow the examples in this article by downloading the sample project from here.
      Forecast for the next few hours and days
      Weather information becomes more valuable when presented in a way that is easy to read at a glance. Using weather tags, WFS enables you to easily incorporate forecasts for the coming hours and days.
      Hourly forecast
      The forecastHours(index, text) tag can be used to show hourly weather updates. One of the two pieces of information that the forecastHours tag collects is an index that takes a number starting at 1 for the following hour. Thus, by setting the index, you can set the data for the next few hours.
      The text part uses five distinct weather tags:
      • Temperature
      • Time of day
      • Weather condition
      • Weather condition name
      • Weather data available
      Use the forecastHours tag with the weather condition, time, and temperature to offer users a short-term forecast of what to expect throughout the day. Tiny weather icons (like Sunny: ☀️, Rainy: 🌧️, and Snow: ❄️) can be used as bitmaps portraying the current weather conditions and the corresponding temperatures.
      Forecast hours for icon
      You can set the weather icon for the upcoming hour by following these steps:
      Create a text component. Use this forecast tag on the text: forecastHours (1, "COND") Choose the Bitmap Font to use icons for the forecastHours (). Select images for the appropriate weather conditions. NoteYou need to create the icons, using any design tool, for your project.
      5. Set the font size to 40. Figure 1: Setting the font size
      NoteOnly a few icons are used in this article for certain conditions; the clear condition icon is used for all other conditions.
      Include 10-15 on the CUSTOM tab since weather condition has values up to 15. Figure 2: Bitmap font setting
      Forecast hours for temperature
      You can now adjust the temperature by using the forecastHours() tag. You may display the temperature (positive or negative) for the upcoming hour and the temperature unit in degrees by following these steps:
      Consider a text element. To display the temperature in degrees, use forecastHours(1,"TEM")° Choose the temperature unit (([WTHR_TEM_UNIT] == 1)? "C": "F")
      The full tag expression looks like this:
      (forecastHours(1, "TEM"))°(([WTHR_TEM_UNIT] == 1)? "C": "F"))
      To display the weather forecast for the next hour, just change the index value to 2. Availability of weather data
      For every forecast tag, you need to check if the data is available with this tag: (forecastHours(X, "IS_AVAIL")).
      In the sample project, for every forecast group, the corresponding weather tag is used for checking its availability. The following tag expression is used for the next hour’s forecast:
      ((forecastHours(1, "IS_AVAIL")) - 1) * 100
      Figure 3: Tag expression for checking availability of weather data
      Daily forecast
      You can incorporate daily weather forecasts into watch face designs using the forecastDays() tag. Customized indices (for example, 1 for tomorrow) make it simple to portray multi-day weather trends. WFS lets you show the weather conditions for a certain day, including high and low temperatures using forecastDays(index, "TEM_HIGH") for highest temperature and forecastDays(index, "TEM_LOW") for lowest temperature.
      The later parts of the sample project show the weather predictions for tomorrow.
      WFS uses the forecastDays(1,"TEM_HIGH") tag to show the temperature for the following day’s high and forecastDays(1,"TEM_LOW") tag for the next day’s low.
      For the high and low temperatures tomorrow, use the following tag expression:
      (forecastDays(1,"TEM_HIGH"))° ~ (forecastDays(1,"TEM_LOW"))°(([WTHR_TEM_UNIT] == 1)? "C": "F")
      You can apply a similar tag expression for the forecast for the days after tomorrow by changing the index value.
      Last weather update (ICU format)
      This watch face example incorporates the most current update time to reassure customers that the weather information is recent. Weather data should be updated often to remain accurate.
      WFS offers the most recent weather update in the ICU format. To add the most recent weather update time in ICU format, follow these steps:
      From the component list, get the ICU date and time. Figure 4: ICU date and time
      To customize the ICU date and time, select the PROPERTIES tab. Choose the ICU Format as HH: MM from the DATE AND TIME section. Set the Local Calendar to Gregorian and the Time Zone to Sync with Device. Select Last Updated Time (Weather) as the Time Source. Figure 5: Date and Time
      Other weather tags
      Current weather condition for icon
      You can use the bitmap font for the current weather condition since it is already prepared for forecastHours(). Use the [WTHR_COND] tag, which provides the current weather, and choose bitmap as the font setting.
      Current temperature
      Use the [WTHR_TEM] tag to show the current temperature. The current temperature is obtained with the following tag expression, which also sets the temperature unit:
      [WTHR_TEM]°(([WTHR_TEM_UNIT] == 1)? "C": "F")
      Today’s highest and lowest temperatures
      You can display the highest and lowest temperatures of the day by using the tags [WTHR_DAY_TEM_HIGH]) for the highest temperature and [WTHR_DAY_TEM_LOW] for the lowest temperature. The highest and lowest temperatures for today are listed below, based on the forecastDays() tag expression for the highest and lowest temperatures for the following day:
      ([WTHR_DAY_TEM_HIGH])° ~ ([WTHR_DAY_TEM_LOW])°(([WTHR_TEM_UNIT] == 1)? "C": "F")
      Summary
      Smartwatches offering weather forecasts are useful and engaging. With WFS, designers can use advanced tags like forecastDays(), forecastHours(), and last update time to deliver real-time weather updates, daily forecasts, and information such as high and low temperatures. Because they provide information at a glance, smartwatch faces are practical and attractive.
      If you have questions or need help with the information 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.
      View the full blog at its source
    • By Samsung Newsroom
      Samsung Electronics announced today that its Neo QLED and Lifestyle TVs have been awarded EyeCare Circadian certification by Verband Deutscher Elektrotechniker (VDE), a leading electrical engineering certification institute in Germany. This achievement highlights Samsung’s commitment to developing technology that supports natural circadian rhythms, promoting well-being and visual comfort.
       
      “This certification underscores our dedication to creating products that elevate the user experience by prioritizing eye comfort and reducing visual strain, all while delivering exceptional picture quality,” said Taeyong Son, Executive Vice President of Visual Display Business at Samsung Electronics. “We will continue to drive innovations that anticipate and adapt to users’ evolving needs, offering both immersive entertainment and sustainable long-term comfort.”
       
      The certification covers major models across the Neo QLED and Lifestyle lineups, including The Frame and The Serif. Six critical criteria are evaluated when determining when a product is fit for certification: Safety for Eyes, Gentle to the eyes, Flicker Level, Uniformity, Color Fidelity and Circadian Stimulus (CS) index — a framework designed to assess visual comfort and circadian rhythm alignment.
       
      Central to Samsung’s achievement is EyeComfort Mode, which automatically adjusts luminance and color temperature based on time of day and ambient lighting conditions. By simulating natural light patterns, the mode reduces strain during daytime viewing and fosters a restful nighttime environment, aligning with the body’s natural rhythms.
       
      This certification adds to a series of recognitions for Samsung TVs, highlighting their user-centric products and features. The Neo QLED series previously earned VDE’s Circadian Rhythm Display certification, while Samsung’s Lifestyle TVs received Glare-Free verification from Underwriters Laboratories (UL) for reducing visual strain. Additionally, for their exceptional color accuracy, Samsung TVs are Pantone Validated.
      View the full article
    • By Samsung Newsroom
      The Samsung Galaxy Watch is an essential gadget for modern health-conscious people. It provides health-related data that helps to prevent health issues. These Galaxy Watch features are driving its rapid rise in popularity and encouraging application developers to create applications specifically for it.
      The Galaxy Watch offers a great user experience and performance. This is where the Flutter framework plays a crucial role. It is a top choice when it comes to a beautiful UI, good performance, and rapid development. Flutter offers cross-platform support, which means we can build applications for multiple platforms using a single code base. With Flutter’s strong community support, developers can make production-grade applications with little effort.
      This blog outlines the steps involved in creating an application for the Galaxy Watch using Flutter, allowing you to explore the possibilities it offers.
      Set up your environment
      Please follow the official Set up Flutter guide to install the Flutter framework correctly on your device. After the installation, please check the status by running the following command. It tells you if any component is missing or suggests what to do next.
      flutter doctor NoteIf the above command provides suggestions or fixes, follow those to solve any problems before continuing. Get started with Flutter projects
      To simplify this application example, we are retrieving the battery levels from a Galaxy Watch to make it easy to understand the development process.
      In this blog, we use Android Studio as the IDE. But, if you are comfortable with VS Code, you can follow this Official Codelab to build your first Flutter application with that instead.
      To start, install the Flutter and Dart plugins on Android Studio. These plugins make it easier to manage Flutter development using the UI instead of the CLI.
      Figure 1: Install Flutter and Dart plugins
      After completing the setup, it is time to create the Flutter Project for Galaxy Watch.
      Go to File > New > New Flutter Project. Note that this method only appears if you installed the plugins mentioned above. Select Flutter from the left side panel and set the Flutter SDK path where it was installed during the Flutter setup, and click the Next button. Enter a project name and location, and choose the language according to your preferences. Uncheck all platform options except Android and keep the other options as they are. Click the Create button, and a new window should open with the project. You are now done. Next, we need to modify the code for Galaxy Watch.
      Break down the elements of a Flutter project
      A simple Flutter project for the Android platform contains the following folders:
      android/: Contains Android platform code and configurations. lib/: The main folder for a Flutter application. It contains your Dart code. The main.dart file is the entry point of a Flutter application. pubspec.yaml: A configuration file for Flutter. It manages the application’s dependencies and assets. Configure the project to support Galaxy Watch
      Let’s modify the generated code to include the battery level, allowing it to be displayed. Open the pubspec.yaml file and add the following plugins under dependencies:
      dependencies: flutter: sdk: flutter wear: ^1.1.0 battery_plus: ^6.0.3 We use the wear and battery_plus plugins for this project. The wear plugin provides APIs for wear-related functionality, and battery_plus is for accessing battery information from the OS. Both plugins were developed by the Flutter Community. You can even get battery information or trigger Wear OS native APIs using the Method Channel, which we will cover in our future blogs.
      Change the value of minSdk to 23, which is required for the plugins that we are using. Go to android > app > build.gradle and change the minSdk property value under defaultConfig.
      defaultConfig { applicationId = "com.example.flutter_app" minSdk = 23 targetSdk = flutter.targetSdkVersion versionCode = flutterVersionCode.toInteger() versionName = flutterVersionName } Add the following code to your AndroidManifest.xml file, above the <application> tag. This tag defines that we are building the application for watches.
      <manifest xmlns:android="http://schemas.android.com/apk/res/android"> <uses-feature android:name="android.hardware.type.watch" /> <application android:label="galaxy_watch_battery_info" Build the watch application
      The main challenge is crafting your application to fit a tiny screen. We must be aware of good practices regarding UI, UX, and compactness at the same time. But as mentioned, this application is a simple one.
      Here we work with the build function of the MyHomePage class, where the UI implementation is applied. The main() function is the starting point for a Flutter application. It triggers the build function sequentially. Refer to the following build method for an example.
      @override Widget build(BuildContext context) { return MaterialApp( title: 'Galaxy Watch Demo', theme: ThemeData( visualDensity: VisualDensity.compact, useMaterial3: true, colorSchemeSeed: const Color(0x9f4376f8), ), home: Scaffold( body: SafeArea( child: _getWatchView(context), ), ), ); } The widgets we use are:
      MaterialApp: The root widget that contains all the contents of the application UI and provides application functionalities like home, theming, navigations, localizations, and so on. Scaffold: It provides a visual layout structure for an application, which has options like an app bar and body. SafeArea: A widget that encircles its child to ensure it avoids overlap with the OS interface. Tailor the UI
      We can now access the WatchShape widget since we converted our application to a watch application. WatchShape is the key widget for watch UI design. It provides the basic interface shapes for watches along with ambient modes of the watch. As mentioned earlier, the UI has a simple button that queries the battery level and shows it in a dialog.
      Widget _getWatchView(BuildContext context) { return WatchShape( builder: (BuildContext context, WearShape shape, Widget? child) { return Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [const Text("Hello from Galaxy Watch"), ElevatedButton(onPressed: () { _battery.batteryLevel.then((batteryLevel) { showDialog<void>(context: context, builder: (_) => AlertDialog( content: Text('Battery: $batteryLevel%'), actions: <Widget>[ TextButton( onPressed: () { Navigator.pop(context); }, child: const Text('OK'), ) ])); }); }, child: const Text('Get battery level'))]) ); }, ); } The widgets we use are:
      WatchShape: This widget makes the UI compact to fit the watch’s small screen. battery.batteryLevel: To access the battery information, we need to create an instance of the Battery class. Please refer to the following code as an example. final Battery _battery = Battery(); Test the application
      Now it’s time to see how your application works. Save all the changes and run the application by clicking the Run button from the “Main Toolbar.” You should see a new UI titled “Hello from Galaxy Watch” with a single button. You have created a Flutter application for a Galaxy Watch. Congratulations!
      Figure 2: Sample application
      Conclusion
      This blog walked you through building an application for Galaxy Watch. Flutter offers an amazing toolkit for crafting beautiful UIs. Within a short time you can build applications on a device to accomplish what you want.
      Don’t forget to experiment with building applications and enjoy the journey of creating something new for Galaxy Watches. For more tips and tricks on Galaxy Watch application development, please keep your eyes on the Samsung Developer portal.
      View the full blog at its source




×
×
  • Create New...