Hello,
I'm trying to prevent the tv to go into sleep mode while on my app, to no avail.
here is the doc I'm trying to understand : https://www.webosose.org/docs/reference/ls2-api/com-webos-service-power/#overview-of-the-api
I've tried several way of communicating but nothing worked. Here is my code:
var Service = require('webos-service');
var service = new Service("com.lge.test");
var sub2 = service.subscribe("luna://com.webos.service.power/suspend/identify", {"subscribe": true});
sub2.on("response", function(message) {
// this is never called
});
var sub = service.subscribe("luna://com.webos.service.power/suspend/suspendRequestRegister", {"subscribe": true});
sub.on("suspendRequest", function(message) {
document.getElementById('txt').innerHTML = 's4';
// this is never called
});
Thanks!!