Quantcast
Jump to content


Enable Water Lock Mode in Galaxy Watch Using Tizen Web App


Recommended Posts

2020-06-15-01-banner.jpg

What is Water lock mode?

Water lock mode was introduced on the Galaxy Watch to prevent accidental touches and wake-up gestures on your screen while swimming. And the thrilling news for developers is that you can enable Water lock mode directly from your app. If you have a fitness-related app, you can use this feature to enhance your app’s capability for various water-based exercises like swimming, water aerobics, and aqua teaser. Let’s dig into the details of how to do this in a Tizen web app.

How do you enable Water lock mode from your app?

This implementation is quite simple. Water lock mode can be enabled using the Application launch API. It involves three simple steps:

  1. Configure your app with privileges
  2. Retrieve application ID
  3. Enable Water lock mode

Let’s get started.

Configure your app with privileges

First, add the following privileges to the config.xml file.

<tizen:privilege name="http://tizen.org/privilege/application.launch"/>
<tizen:privilege name="http://tizen.org/privilege/application.info"/>
<tizen:privilege name="http://tizen.org/privilege/power"/>
  • http://tizen.org/privilege/application.launch - Allows the application to open other applications
  • http://tizen.org/privilege/application.info - Allows the application to retrieve information related to other applications
  • http://tizen.org/privilege/power - Allows the application to control power-related settings

Retrieve application ID

You can enable Water lock mode directly using the launch() method of the Application API. The launch() method launches an application with the given application ID. That’s why we need to know the application ID of the Water lock mode pop-up.

Retrieve the app ID using the following code snippet in the JS file. The following code snippet returns the list of all applications installed on the watch. Among them you can choose the exact ID of the app which you need to launch. For example, we picked the ID com.samsung.clocksetting.water-lock-popup to enable Water lock mode.

function onListInstalledApps(applications) {
    for (var i = 0; i < applications.length; i++)
        console.log("ID : " + applications[i].id);
}

tizen.application.getAppsInfo(onListInstalledApps);

Figure 1: Installed application list
Figure 1: Installed application list

Enable Water lock mode

Once you get the app ID, you can enable Water lock mode with following code snippet in the JS file:

tizen.application.launch("com.samsung.clocksetting.water-lock-popup");

And that’s it. Water lock mode is launched. Please note that, if the mode is launched for the first time in the device, a pop-up appears with a permission message.

When Water lock mode is enabled, the touchscreen, as well as the wake-up gesture feature, is deactivated. So, there is no user interaction between the user and your app. Meanwhile your application runs in the background. So if you want to keep your app running in the foreground, you can use the Power API.

To set the power state, the request() method is called. To manage the screen and CPU state, use the following code snippet in the JS file:

tizen.power.request(“SCREEN”, “SCREEN_NORMAL");
tizen.power.request("CPU", "CPU_AWAKE");
tizen.power.release("SCREEN");
tizen.power.release("CPU");

For example, here I have added a time counter while the Water lock mode is on using an open source library named EasyTimer.js. First, add the JS library to the HTML file.

<script src="lib/easytimer/dist/easytimer.min.js"></script>

After that, add the following code snippet to the JS file to implement a time counter.

var timerInstance = new easytimer.Timer();
timerInstance.start();
timerInstance.addEventListener('secondsUpdated', function (e) {
		document.getElementById("excercise_timer").textContent=timerInstance.getTimeValues().toString();
});
document.getElementById("counting_done").addEventListener("click", function(){
	timerInstance.stop();
});

2020-06-15-01-02-v2.png

Figure 2: Water lock enabled

To disable Water lock mode, users must long press the Home key. After disabling Water lock mode, the user can start interacting with your app immediately. For example, the user can stop the time counter using the Done button in the sample app (see Figure 2).

Quite simple, right? You can check out the sample app here. If you have any questions, you can post your queries to Samsung Developer's forum.

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

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...
  • Similar Topics

    • By Samsung Newsroom
      Samsung Electronics today announced the addition of SeeColors mode on its 2023 TV and monitor lineup.1 The newly added accessibility feature provides various color settings based on degrees and types of color vision deficiency (CVD),2 offering an improved viewing experience.
       
      SeeColors mode provides nine picture presets so users can select the option that is most suitable for them. The feature adjusts red, green and blue levels to ensure viewers can easily distinguish colors on the screen depending on their degree or type of CVD.
       
      Originally released as an application in 2017, SeeColors helps those with CVD enjoy their screen as it was meant to be seen. Now, integrated in TV and monitor accessibility menus, this feature is more readily available to users. For consumers who have already purchased a 2023 model, a software update will be available to add SeeColors to the accessibility menu.
       
      Samsung has earned “Color Vision Accessibility” certification from TÜV Rheinland,3 in acknowledgement of SeeColors mode’s ability to help those with CVD better enjoy content on Samsung screens. This recognition builds on Samsung’s commitment to accessibility, under the vision of “Screens Everywhere, Screens for All.”
       
      “We are thrilled to introduce additional accessibility features, including SeeColors and Relumino mode, in our 2023 TV and monitor lineup to assist individuals with color blindness and low vision,” said Seokwoo Jason Yong, Executive Vice President of Visual Display Business at Samsung Electronics. “Under the vision of ‘Screens Everywhere, Screens for All,’ we will continue to innovate and bring inclusive technologies closer to our consumers.”
       
      For more information on Samsung’s accessibility features, please visit www.samsung.com.
       
       
      1 SeeColors mode is available on Samsung’s 2023 TV and monitor lineup, including the Neo QLED, QLED, OLED, Smart Monitor and the G95SC gaming monitor.
      2 This feature is not intended for use in the diagnosis of disease or other conditions, or in the cure, mitigation, treatment or prevention of any disease or medical problem. Any information found, acquired or accessed through this feature is made available for your convenience and should not be treated as medical advice.
      3 TÜV Rheinland, headquartered in Cologne, Germany, is a globally renowned testing organization that offers quality and safety certifications across various industries. The “Color Vision Accessibility” certification was awarded on June 7, 2023.
      View the full article
    • By Samsung Newsroom
      Samsung Electronics firmly believes in the power of technology to create a more inclusive world. When it comes to design, accessibility should be top of mind ensuring that everyone, regardless of their abilities, can fully enjoy the benefits of modern innovations. Traditional television can present challenges when accessing and comprehending visual content. However, through the use of visual aid features, Samsung is helping bridge the gap and providing an immersive and enjoyable viewing experience for all.
       
      Relumino Mode, a viewing mode on select Samsung TVs, was designed to augment the visual capabilities of those with low vision, making it possible for anyone to engage with their favorite shows, movies and documentaries like never before. By highlighting specific parts of videos — such as contrast, color and sharpness — this feature makes it easier than ever to discern content on the TV screen.
       
      To shed more light on this groundbreaking inclusive technology, Samsung Newsroom sat down with Dr. Kyungah Park and Jason (Jaeseong) Park from Visual Display Business, Samsung Electronics, to discuss everything from development to clinical trials.
       
      ▲ Jason Park (Samsung Electronics) and Kyungah Park, M.D. (Samsung Medical Center) discuss their journeys in creating and clinically testing Relumino Mode
       
       
      Screens for All — Including People With Impaired Vision
      Relumino, borrowed from Latin, means “to give back the light.” The idea is to restore vision as much as possible to people with impaired vision. Earlier this year at CES, Samsung introduced Relumino Mode on select Samsung TVs. This follows the wearable device “Relumino Glass” and the smartphone image processing software “Relumino App,” each revealed at CES in 2017 and 2018, respectively. Before that, Relumino was conceived in “C-Lab(Creative Lab),” Samsung Electronics’ in-house venture program. It has evolved and expanded ever since.
       
      ▲ Relumino Glass(left) and Relumino Mode for Samsung TVs(right)
       
      “For several years, ‘Screens for All’ has been one of the key mottos for us. We’re working to further enhance TV accessibility and promote inclusion,” said Jason Park, who plans products and services for the Visual Display Business. “People with low vision are still a key demographic that need better TV viewing experiences.”
       
       
      Innovation Rooted in the User’s Perspective
      To develop Relumino Mode, planners and engineers met with a number of advisors who had visual impairments to understand their wants and needs.
       
      ▲ Jason Park, Visual Display Business, Samsung Electronics
       
      “There’s an early experience that really changed my perspective,” shared Jason. “When we first met an advisor for Relumino Mode, I asked him to ‘Please come here and have a seat’ to which he replied, ‘Where is here?’ That was a hard and clear wake-up call for me. I was so embarrassed.” It was then that Jason realized that they were exploring a totally new territory and would have to first understand the way their users see the world.
       
      ▲ As part of the efforts to understand customers with visual impairments, Samsung engineers used special goggles to simulate blurry vision
       
      Despite the decades of collective experience in enhancing TV picture quality, this particular project presented a unique challenge that none of the engineers had encountered before. Typically, their expertise lay in identifying even the slightest imperfections on the screen, but now they had to understand what it’s like as a user to have impaired vision. In addition to consulting advisors, the engineers utilized special goggles that simulated blurry vision, serving as a starting point for their exploration. Through a process of generating ideas, conducting trials and learning from mistakes, they eventually developed a solution that could be considered a genuinely effective viewing mode.
       
       
      Clinical Trials and Direct Feedback
      After initial research and development came trials on a larger scale. This is where Samsung Electronics decided to collaborate with Samsung Medical Center, one of South Korea’s most comprehensive medical facilities.
       
      ▲Dr. Kyungah Park, Department of Ophthalmology, Samsung Medical Center
       
      “Clinical trials targeting people without disabilities are popular and recruiting subjects for these projects is relatively easy. Some even ask to join before we ask,” said Dr. Park. “But, that was not the case for the Relumino study. The pool was much more limited as we were more strict with our requirements — we targeted people who have lower vision than WHO’s vision impairment criteria.”
       
      However, the people that Samsung contacted showed much passion for the project. “Many who joined the trials were very excited and didn’t mind traveling long distances for the study. Thanks to their support and encouragement, we were able to carry out the research,” Dr. Park added.
       
      Four 55-inch Samsung QLED TVs were featured in the tests. One displayed the control image with no picture enhancements at all. The other three TVs showed the same content with Relumino Mode on high, medium and low. The TVs were installed on a meter away from each other onw a wall in a room with a specified amount of light.
       
      The test was two-fold, with objective and subjective evaluations. A certified contrast sensitivity test was employed for the objective evaluation. For the subjective evaluations, participants were asked to examine a set of eight still images and two videos on each of the screens. Their satisfaction levels were measured on a scale of 0 to 10. Based on the results, researchers carried out additional interviews adjusting picture enhancement levels on the spot.
       
      ▲ A blurry vision goggle simulation of what Relumino Mode may look like to people with visual impairment
       
      Relumino mode was well received by the group. One of the participants highly praised the technology, saying “I was thrilled to see the ball in a soccer match on screen. It can get frustrating if you can’t see the ball because of low vision, as you can imagine. Relumino Mode helped me see the ball clearly.”
       
      “The subjects’ responses indicated the Mode’s subjective results while the contrast sensitivity testing showed its objective results. Both of these factors, combined, allowed us to find the optimal setting for a brilliant image on TV,” said Jason.
       
       
      Screens for All, Today and Tomorrow
      “While [the Relumino Mode] project focused on people with relatively severe visual impairment many people with slightly lighter symptoms still need help. I’d like to work on developing projects for them,” explained Dr. Park.
       
      Jason shared a similar point of view, saying, “Samsung will continue to advance technology in the long term to provide personalized picture quality for people with vision impairment and let them enjoy TV comfortably.” Samsung remains committed to accessibility and strives to leverage its technologies to enable more people do what they enjoy.
      View the full article
    • By BGR
      The Galaxy S23 preorder period is almost over, and Samsung will soon start shipping the Galaxy S23, S23 Plus, and Ultra to buyers. The consensus seems to be that the three phones are great upgrades, ready to deliver a solid experience all around. The Galaxy S23 phones offer great performance and camera features, and battery life is also a Galaxy S23 Ultra highlight. Overall, the Galaxy S23 is a much better upgrade than the Galaxy S22. And the phone might have a few hidden features that Samsung hasn’t exactly detailed on stage.
      One of these features is a secret battery charging mode for playing games or using any other apps that might be taxing the processor. The phone can bypass battery charging to provide energy directly to the processor. In turn, this boosts peak performance and prevents overheating.
      The Galaxy S22 series surprised fans with a throttling feature that would reduce the processor speed to prevent overheating. The phone was also cheating in benchmarks. This was a major issue that impacted the phone’s launch, forcing Samsung to apologize to buyers and shareholders. The Galaxy S22 is the reason why there’s no Exynos-powered Galaxy S23 this year. And why there might not be one for years to come.
      Instead, Samsung rocks a custom version of the Qualcomm Snapdragon 8 Gen 2 chip inside all Galaxy S23 handsets. That chip offers the best possible performance an Android phone can get this year, even if the Galaxy S23 can’t match the iPhone 14’s performance. Or iPhone 12, for that matter.
      Benchmarks aside, the Galaxy S23 should have no problem running apps and high-end games. But if you happen to be playing a title that uses plenty of CPU and GPU resources while you’re charging the Galaxy S23 battery, you’ll be able to take advantage of a new Pause USB Power Delivery feature. Found by YouTube channel NL Tech in the Game Booster settings, the feature lets you power the phone without recharging it.
      The battery charging bypass might help you reduce overheating during extended gameplay sessions. The phone won’t have to simultaneously provide energy to the Galaxy S23 chips and the battery. Instead, it’ll provide less power that goes directly to the processor, bypassing the battery.
      According to the Galaxy S23 Ultra review above, the phone draws just 6W of power when Pause USB Power Delivery is on. If the battery is charging at the same time, the power consumption increases to 17W.
      In addition to preventing battery overheating and wear, the feature should also improve peak CPU performance during intensive tasks.
      The downside is that the battery won’t charge during gameplay. Also, to pause battery charging during games, the Galaxy S23 has to hold a charge of at least 20%. The other immediate issue is that you have to play games while connected to a charger, which might not be a great experience.
      Considering the Galaxy S23 phones rock the latest Snapdragon flagship, you don’t have to worry about gameplay performance. The battery charging bypass might come in handy on mid-range devices. And it looks like Samsung is rolling it out to older hardware.
      According to the same YouTube channel, many Samsung phones quietly support the Pause USB Power Delivery feature. Check out the video below to see how to enable it.
      Don't Miss: Galaxy S23 Ultra is slower than the iPhone 13 mini and iPhone 12 in benchmarksThe post Galaxy S23 has a secret battery charging mode for when you’re playing games appeared first on BGR.
      View the full article





×
×
  • Create New...