Hi,
I set an alarm in the app, both in the UI or the service.
On service “alarmCallback” haven’t received the corresponding callback function from the URI.
Can you help checking the code?
function setAlarm() {
console.log(“setAlarm start:”);
ServiceContext.getService().call(“luna://com.webos.service.alarm/set”,
{
“key”: “my_app_unique_alarm”,
“uri”: “luna://com.omni.devices.app.service/alarmCallback”,
“params”: {
“message”: “time is go”,
“task”: “showNotification”
},
//“at”: “12/25/2024 20:00:00”,
“in”: “00:00:10”,
“wakeup”: true,
“keep_existing”: true
}, (response) => {
console.log(“receive:”, response);
console.log(“error:”, response.isError);
console.log(“error info:”, response.errorText);
console.log(“payload:”, response.payload);
});
console.log(“setAlarm end:”);
};
ServiceContext.getService().register(“alarmCallback”, function(message) {
console.log(“alarmCallback:”, message.payload);
message.respond({
returnValue: true,
message: “success”
});
});