언어 설정

Menu
Sites
Language
Is it possible to TURN ON/OFF the always on mode from own application? (to change watch settings)

Is it possible to TURN ON/OFF the always on mode from own application? (to change watch settings)

Edited by: Anonymous on 03 5월, 2019

Responses

2 댓글
André Reus

hi Serzh Ivasyshyn

You can Turn ON/OFF Always On mode manually from Settings>Style

And for programatically ON/OFF i have not found any direct API. But i think you can manage it using Power API. 

To switch on the screen, call the turnScreenOn() method of the PowerManager interface:
tizen.power.turnScreenOn();
To switch off the screen, call the turnScreenOff() method of the PowerManager interface:
tizen.power.turnScreenOff();

Ref: 

1. https://developer.tizen.org/dev-guide/web/2.3.0/org.tizen.mobile.web.appprogramming/html/tutorials/sys_tutorial/managing_screen.htm

2. https://developer.tizen.org/dev-guide/web/2.3.0/org.tizen.mobile.web.device.apireference/tizen/power.html#PowerManager

But I will suggest you to use Ambieant mode if your requirements is not fixed for Always ON Mode.

 In low-powered wearable devices, the Tizen platform supports an ambient mode for watch applications. When the device enables the ambient mode, the Tizen watch application displayed on an idle screen can show a limited UI to reduce power consumption. The watch application also receives a tick event every minute in the ambient mode.

document.addEventListener("ambientmodechanged", function(ev)
{
    var mode = ev.detail.ambientMode;
    if (mode == true)
    {
        /* Change the UI for ambient mode */
    }
    else
    {
        /* Change the UI for normal mode */
    }
});

document.addEventListener("timetick", function(ev) 
{
    /* Update the UI */
});

-Thanks

Isn't always on mode the same as ambient mode? (ambient mode = always on mode).

tizen.power.turnScreenOn(); turns display on, it isn't ambient mode (always on mode).

I know I can manually turn it ON/OFF (Settings>Style), but I'm looking for the way how to switch it from own application. I have't found any API that allows to do that :(

Thanks!