var pkgInfo = require('./package.json');
var Service = require('webos-service');
var greeting = "Hello, World!";
var service = new Service('fit-webos-app.helloworld');
service.register('hello', function (message) {
message.respond({
greeting: 'Hello, World!',
});
});
I want to use a JavaScript Service in a WebOS TV application using Enactjs. I initialized the service and the results came out like the image above. How to call correctly? And explain to me whether the application on TV supports running in the background with the operating system? Any relevant answers. Thank!
The code I call the service:
new LS2Request().send({
service: "fit-webos-app.helloworld",
onSuccess: function (inResponse) {
console.log("Successfully helloworld ======>", inResponse);
},
onFailure: function (inError) {
console.log("Failed to helloworld ======>", inError);
},
})