2

I am developing an app for the Samsung Gear S3 with the web API and TAU. I have turned on the wrist gesture that turns on the screen and turns it off, depending on the gesture. I would like to prevent that from happening, when I have my app running. I do not want to change the Gear's system settings.

In my config.xml file, I have granted the app powerprivileges:

<tizen:privilege name="http://tizen.org/privilege/power"/>

When I get to the page where I need the app to stay on, I tried to keep the screen on using:

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

and release it with:

tizen.power.release("SCREEN");

but that doesn't change a thing. If i shake my wrist, the watch goes off and pauses my app, what I want to prevent.

Zim84
  • 3,404
  • 2
  • 35
  • 40

1 Answers1

0

I also would like to know if there is a solution for this. What I did to (kind) solve this problem was to create a listener that detects when the screen state changes. When changes to SCREEN_OFF it turns on the screen.

tizen.power.setScreenStateChangeListener(onScreenStateChanged);

function onScreenStateChanged() {
    if (!tizen.power.isScreenOn()) {
        tizen.power.turnScreenOn();
    }
}