Quantcast
Jump to content

Use Tizen To Enable Galaxy Watch Rotary Events


STF News
 Share

Recommended Posts

Rotary event handling, enabled via the bezel, is supported on the Tizen platform. A bezel is a term used to describe the outside frame of a device, and in the case of a Galaxy Watch, the bezel is the outer ring of the device, which can be rotated. Rotary events are triggered from the Galaxy Watch rotary component when the bezel is rotated clockwise or counterclockwise. The event for each rotation is measured in incremental units called “detents.”

rotary_event.png

Bezel interactions can be used in a variety of ways, such as controlling the application page, controlling the snap list, changing the progress bar value, scrolling the page, changing the volume, and setting configurations such as date-time on the date-time picker.

This blog discusses how to handle rotary events in Tizen web and native applications. In the following example, you’ll learn how to let a user interact with bezel by using the rotary event to receive or reject a call. The user rotates the bezel clockwise to receive the call and counterclockwise to reject it.

galaxy-watch_lifestyle_hands-free_s.png

Note: Because Galaxy Active devices do not have bezels, rotary features will not work on them.


Prerequisites

Tizen Web
In the Tizen web application, add the following line in the config.xml file:

<feature name="tizen.org/feature/input.rotating_bezel"/>

Tizen Native
In the Tizen native application, include the <system_info.h>header file to use the functions and data types of the system information API.

#include<system_info.h>

You also must add the following line to the manifest file:

<feature name="http://tizen.org/feature/input.rotating_bezel">true</feature>

Check capability

Tizen Web

In the Tizen web application, use the following line to check if the device supports rotary events or if it uses bezel:

var isSupport = tizen.systeminfo.getCapability('http://tizen.org/feature/input.rotating_bezel'); 
console.log(' Bezel = ' + isSupport);

The getCapability() function of the Tizen web API returns with information about whether or not the device supports bezel.

Tizen Native
In the Tizen native application, use the following code to check bezel capability:

bool rotaryValue;
int rotaryReturn;
    rotaryReturn = system_info_get_platform_bool("http://tizen.org/feature/input.rotating_bezel", & rotaryValue);
    if (rotaryReturn!= SYSTEM_INFO_ERROR_NONE) {
       dlog_print(DLOG_INFO, LOG_TAG, "Rotary error");
        return;
    }
dlog_print(DLOG_INFO, LOG_TAG, "Bezel: %s", value ? "Supported" : "Not supported");

Implementation

Tizen Web
Register the rotarydetent event. After registering an event, ev.detail.direction provides the direction value. If the value is CW, the bezel is rotated clockwise. If the value of direction is CCW, the bezel is rotated counterclockwise.

document.addEventListener('rotarydetent', function(ev) {
        /* Get the direction value from the event */
        var direction = ev.detail.direction;
        var textbox = document.querySelector('.contents');
        box = document.querySelector('#textbox'); 
        
        if (direction == 'CW') {
            /* Add behavior for clockwise rotation */
            console.log('clockwise');
            box.innerHTML ="clockwise";
        } else if (direction == 'CCW') {
            /* Add behavior for counter-clockwise rotation */
            console.log('counter-clockwise');
            box.innerHTML ="counter-clockwise";
        }
  });

Tizen Native
Register the rotary event in the app using the following line:

eext_rotary_event_handler_add(_rotary_handler_cb, ad);

The handle function is defined using following code:

Eina_Bool
_rotary_handler_cb(appdata_s *data, Eext_Rotary_Event_Info *ev)
{
    if (ev->direction == EEXT_ROTARY_DIRECTION_CLOCKWISE) {
        dlog_print(DLOG_DEBUG, LOG_TAG,
                   "Rotary device rotated in clockwise direction");

    } else {
        dlog_print(DLOG_DEBUG, LOG_TAG,
                   "Rotary device rotated in counter-clockwise direction");
    }
    return EINA_FALSE;
}

If the rotation direction is equal to EEXT_ROTARY_DIRECTION_CLOCKWISE, the bezel is rotated clockwise. Otherwise, the bezel is rotated counterclockwise.


Demo

Two sample apps are attached:
Rotary Native
Rotary Web

Web
When you run the web sample app and turn the bezel clockwise, the following text appears on the watch face:

CW_web.png

When you turn the bezel counter counterclockwise, “counterclockwise” appears on the watch face:

CCW_web.png

Native
When you run the native sample app and turn the bezel clockwise, the following text appears on the watch face:

CW_native.png

When you turn the bezel counterclockwise, the following text appears:

CCW_native.png


For more information

The bezel is the physical controller of some Samsung wearable devices. Understanding the physical characteristics of the bezel will help you design better interactions.

References:

View the full blog at its source

Link to comment
Share on other sites



  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Similar Topics

    • By BGR
      After the Galaxy S22 series blunders, Samsung assuredly can’t wait to release a traditional smartphone that consumers can actually get excited about. Add to that the incredible iPhone 14 Pro sales and Apple’s manufacturing issues in China, and Samsung has plenty of reasons to launch the Galaxy S23 series as quickly as possible next year.
      A report from Korea says the launch event will take place in the US in early February. But we don’t have an actual date for the event yet.
      We’ve always expected the Galaxy S23 series to hit stores in the first quarter of 2023 after a two-week preorder period. That’s been Samsung’s strategy in recent years. But this is the first time that a more specific launch window has leaked this early.
      According to Korean media, an unnamed Samsung executive confirmed the launch period.
      “The S23 series will be shown during our own Unpacked event in the United States, which will be held in February,” the person said. They didn’t mention a date or city, but local media said the Galaxy S23 launch event would take place in San Francisco in the first week of the month.
      February 1st falls on a Wednesday next year. If the claim is accurate, Samsung will launch the handset by Sunday, February 5th. Samsung unveiled the Galaxy S22 on February 9th.
      Galaxy S23 Plus renders reveal redesign. Image source: @OnLeaks/Smartprix The Galaxy S23 could hit stores before the 2023 edition of the Mobile World Congress kicks off in Barcelona on February 27th. MWC was once the home of the Galaxy S launch event. But in recent years, Samsung moved away from the big Spanish mobile show.
      The report notes that the Galaxy S23 series might be more expensive. But the good news is that Qualcomm’s brand new Snapdragon 8 Gen 2 will power all Galaxy S23 models. This should prevent any performance issues similar to the Galaxy S22 series.
      Galaxy S22 issues aside, Samsung’s mobile business isn’t doing great compared to Apple’s iPhone. Samsung handset sales fell 11% last month, according to the report. Apple’s iPhone sales rose by 10% as the company launched the iPhone 14.
      Demand for the iPhone 14 Pro remains high in December, as Apple is dealing with massive COVID-related production issues in China that have further delayed shipments. An early Galaxy S23 launch might help Samsung take advantage of that.
      Samsung has yet to announce anything officially. Invites for the Galaxy S23 media event should go out in January if the early February launch event claim is accurate.
      The post Galaxy S23 launch event reportedly set for early February appeared first on BGR.
      View the full article
    • By BGR
      Amazon’s massive Prime Day 2022 sales event is just a few weeks away. That means there will soon be an avalanche of unbelievable deals on anything and everything you can think of. In fact, there are already some outstanding early Prime Day deals available right now — including free money from Amazon! But Prime Day isn’t the only game in town this summer. The huge Discover Samsung event you’ve been waiting for is now underway, and it’s packed full of terrific deals on popular Samsung devices.
      🚨 SHOP DISCOVER SAMSUNG NOW 🚨 From Galaxy phones and tablets to headphones, kitchen appliances, and stunning Samsung smart TVs. It’s all on sale right now in Samsung’s online store!
      Discover Samsung is the company’s biggest event of the year, and we’re going to highlight our favorite deals for you right here.
      Discover Samsung event: Best smartphone & tablet deals

      Anyone in search of a new Galaxy smartphone has come to the right place. During the big Discover Samsung event of June 2022, there are some seriously impressive deals on the latest Samsung Galaxy phones.
      First up, you can get a Galaxy Z Flip 3 5G with free Galaxy Buds Live for as low as $599.99 with a trade-in. You can even trade in an old smartphone with a cracked screen and still get a credit up to $800. Plus, you’ll get 30% off when you also buy a Galaxy Tab S8 series tablet.
      Speaking of Galaxy S8 Tablets, Samsung is offering free $200 Galaxy Buds Pro with the purchase of any S8 series tablet.
      And if you think those deals are impressive, wait until you see Samsung’s Galaxy Z Fold 3 offer.
      Between now and the end of the Discover Samsung event, you can buy a new Galaxy Z Fold 3 5G with free Galaxy Watch 4 for the same low price of $599.99 with a trade-in. That means you’ll get a trade-in credit of up to $1,200!
      And last but not least, you’ll get a free memory upgrade and a trade-in credit of up to $1,000 when you buy a Galaxy S22 Ultra or a Galaxy S22/S22+. That means you can score a Galaxy S22 256GB starting at $99.99 or a Galaxy S22 Ultra 256GB for $199.99.
      Here’s a recap of those five great deals:
      Galaxy Z Flip 3 5G with free Galaxy Buds Live: $599.99+ with trade-in Galaxy Z Fold 3 5G with free Galaxy Watch 4: $599+ with trade-in Samsung Galaxy S22 Ultra & free memory upgrade: $199.99+ with trade-in Galaxy S22/S22+ & free memory upgrade: $99.99+ with trade-in Galaxy S8 Series Tablet & free Galaxy Buds Pro: $149.99+ More great Samsung deals

      The deals listed above are terrific for anyone in search of a new smartphone or tablet. Of course, that’s just the tip of the iceberg in the Discover Samsung summer sales event.
      There are also fantastic deals available on Samsung TVs, kitchen appliances, smartwatches, laptops, and more. Here are five additional deals that we love:
      Galaxy Watch 4: Save $70 and get an extra charger free Samsung The Frame 4K smart TV: Prices start at just $459.99, save up to $1,000 Galaxy Chromebook, 256GB, 8GB RAM, Fiesta Red: $649.00 (save $350) Bespoke AirDresser Clothing Care System: $1,149.00 (save $450) Bespoke 4-Door French Door Refrigerator: $2,499.00 (save $1,300) Do you want to see more of the deep discounts from the big Discover Samsung event? Start shopping now because this Samsung mega-sale is set to end on Sunday, June 26.
      🚨 SHOP DISCOVER SAMSUNG NOW 🚨 Go here to see this month’s best deals online!
      The post Discover Samsung event: 10 deals you need to see to believe appeared first on BGR.
      View the full article
    • By STF News
      View the full blog at its source
    • By STF News
      View the full blog at its source
    • By STF News
      On January 6th, Samsung Electronics virtually unveiled its 2021 TV product portfolio at the company’s annual First Look 2021 event.
       

       
      The latest additions to the Samsung Visual Display lineup range from products that provide new premium entertainment experiences to purpose-driven inclusivity features – and more. In case you missed the event, check out these five highlights from the First Look 2021 presentation.
       
       
      1. A Sustainable and Accessible Future for All
      Samsung will seek to decrease its overall carbon footprint across the TV manufacturing, packaging design and product power efficiency areas.
       

       
      In 2021, Samsung TVs will come with a solar-powered remote control that can be recharged by indoor light, outdoor light or USB—a first-of-its-kind innovation for the brand. This will help prevent waste from a projected 99 million AA batteries over seven years.
       

       
      The 2021 TV lines will also include the latest advances in technology and AI to give those with the hard of hearing, the deaf, people with low vision, and the blind the power to comfortably enjoy their TV experiences through new features that include Caption Moving, Sign Language Zoom, Multi-Output Audio and Voice Guide.
       

       
       
      2. Hailing a New Era of Breathtaking Picture Quality and Design

       
      In 2018, Samsung’s first MICRO LED display was introduced in the form of “The Wall”— a system of configurable modules that could be installed professionally. In December 2020, Samsung then announced the launch and pre-sale of the groundbreaking 110” Samsung MICRO LED in Korea.
       

       
      Unlike any other displays currently available on the market, Samsung MICRO LED produces astonishing color vibrancy and brightness with self-emissive LED display technology along with an all-new Micro AI processor that delivers stunning 4K HDR content.
       
       
      3. Neo QLED Takes a Quantum Leap in LED Technology


       
      By incorporating Quantum Mini LEDs based on Quantum Matrix Technology into their visual display products, Samsung is taking QLED to the next level by enabling displays to have precise control of the individual LED pixels, which can prevent blooming and maximize display longevity. Samsung’s 2021 8K Neo QLED features a new Infinity One Design—a nearly bezel-less form factor that provides an even more immersive viewing experience – as well as an all-new cable management system with the Slim One Connect box that can be attached to the TV’s back.
       

       
      The 2021 8K Neo QLED also features several premium, room-filling audio functionalities that correspond to the movement of objects onscreen and uses AI to analyze a TV’s physical environment to deliver an immersive sound tailored specifically to a user’s space.
       
       
      4. Enhancing the Award-Winning Lifestyle TV Portfolio

       
      In addition to bolstering their QLED lineup, Samsung is also enhancing its 2021 Lifestyle TV line with new design and form factors to reflect the changing interests and tastes of consumers. Since launching in 2017, The Frame has redefined the concept of the television, transforming displays into stunning works of art – with over one million units sold. In 2021, The Frame will become 46% thinner and offer five color options and two different customizable styles—Modern and Beveled—to match the aesthetic of each and every room The Frame is placed in.
       
       
      5. New Smart TV Features for 2021

       
      During the past year, we have all witnessed seen the pivotal role technology has played in helping us carry on with our lives and stay connected to each other. Samsung’s 8K and 4K 2021 Neo QLED models offer smart features that expand the role of the TV and adapt to the changing needs of consumers in the fields of fitness, entertainment and the home office.
       

       
      Samsung’s 2021 TVs will sport new productivity features, including Google Duo for large-screen video conference calls right from your living room; Super Ultrawide Gameview and Game Bar for gamers enjoying next-generation 4K gaming consoles; and Samsung Health’s Smart Trainer, a feature that tracks and analyzes your workouts via AI and provides feedback on form, rep improvement and estimated calories burnt.
       
      As the company heads into its 15th year as the leading global TV brand, Samsung announced its ‘Screens Everywhere, Screens for All’ vision, underscoring their commitment to closely aligning business operations with a series of long-term sustainability and accessibility endeavors. Stay tuned to learn more about the innovations for the future of the display Samsung has in store in 2021.
       
       
      * Revision has been made from ‘AAA batteries’ to ‘AA batteries’ with regards to the Solar Cell Remote Control on March 4, 2021.
      View the full article



×
×
  • Create New...