언어 설정

Menu
Sites
Language
Power API in Tizen 4.0

Hello.

Up until Tizen 4.0, it was possible to turn on and turn off the watch screen using Power API calls:

 

tizen.power.turnScreenOn();
tizen.power.turnScreenOff();

They were deprecated in Tizen 3.0 and now they are gone in Tizen 4.0.

To which API has this functionality been moved? How can I turn the screen on/off on devices with Tizen 4.0?

Thank you

Edited by: Maciej on 26 7월, 2018

Responses

3 댓글
André Reus

hi, use these 

//To keep On
tizen.power.request("SCREEN", "SCREEN_NORMAL");

// To Off
tizen.power.request("SCREEN", "SCREEN_OFF");

Follow this 

https://developer.tizen.org/development/guides/web-application/device-settings-and-systems/power-states#manage

Maciej

Hello. Thanks for your answer. I know these calls, I also use them. However, aren't they used to maintain the state of an already active screen?

Will

tizen.power.request("SCREEN", "SCREEN_NORMAL");

turn the screen on, if it's off (not showing a watchface etc.)?

I thought it was only to maintain a specific screen state.

 

Also, about "SCREEN_OFF", the documentation from your link states:

"In this state, the screen is off. You cannot request this state, but it can be used in event handlers."

So it seems it is not possible to turn the screen off with this API?

 

André Reus

You can not directly request to SCREEN_OFF. It can be called only by event handlers. 
SCREEN_NORMAL will keep your screen on until you manually off it or programatically off it by SCREEN_OFF after a event.