Tizen Developers

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 on 04 05, 2019

Responses

1 Replies
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