My watch (torch) web app was rejected from the Galaxy Store because the screen would prematurely switch off during Samsung’s testing. However, these effects don’t happen on my watch, so I’m wondering why?
The app was built as a Web application (so I used HTML, CSS, JS) and I have enabled: tizen/privelege/power
To prevent the screen from switching off, I think the solution could be to enable: tizen/privelege/display
But this privilege is only possible for native applications (built in C / C++), any ideas on a workaround?
Here’s a snippet of the JS:
var torchBool = true;
function torch(){
document.body.classList.toggle('white');
if (torchBool) {
tizen.power.request('SCREEN', 'CPU_AWAKE');
tizen.power.setScreenBrightness(1);
console.log(torchBool);
return torchBool = !torchBool;
}
tizen.power.release('SCREEN');
tizen.power.restoreScreenBrightness();
}
Thanks in advance!