Notification triggered from the app not showing up
Notification triggered from the app not showing up
BY 13 Sep 2017Web Application Development
Platform: Gear S3 Model SR-R765A
Tizen: 2.3.2.3
The watch is not paired with a phone
I’m experimenting with the notification system from a web application and I’m running into issues where the notifications are not consistently appearing. Sometimes, the notification will show, sometimes it will not, and I’m not able to detect why. Note that I’m directly deploying the app to the watch.
Is this a known issue?
Is there anything wrong with the following setup?
– Create a sample application from TAU Basic UI template;
– Add a button with the id raiseNotification in the app;
– My app.js file has the additional code;
var notificationButton = document.getElementById(“raiseNotification”);
var page = document.getElementById(“main”);
var okClickBound;
function onClickOK(event) {
console.log(“about to raise notification”);
try {
var notificationDict1 = {
content : “Check the plane engine.”,
iconPath : “./icon.png”,
vibration : true,
ledColor : “#FFFF00”,
ledOnPeriod : 1000,
ledOffPeriod : 500
};
var notification1 = new tizen.StatusNotification(“SIMPLE”,
“Simple notification”, notificationDict1);
tizen.notification.post(notification1);
console.log(“notification sent from the button”);
} catch (err) {
console.log(err.name + “: ” + err.message);
}
return;
}
Notification triggered from the app not showing up
Platform: Gear S3 Model SR-R765A
Tizen: 2.3.2.3
The watch is not paired with a phone
I’m experimenting with the notification system from a web application and I’m running into issues where the notifications are not consistently appearing. Sometimes, the notification will show, sometimes it will not, and I’m not able to detect why. Note that I’m directly deploying the app to the watch.
Is this a known issue?
Is there anything wrong with the following setup?
– Create a sample application from TAU Basic UI template;
– Add a button with the id raiseNotification in the app;
– My app.js file has the additional code;
var notificationButton = document.getElementById(“raiseNotification”);
var page = document.getElementById(“main”);
var okClickBound;
function onClickOK(event) {
console.log(“about to raise notification”);
try {
var notificationDict1 = {
content : “Check the plane engine.”,
iconPath : “./icon.png”,
vibration : true,
ledColor : “#FFFF00”,
ledOnPeriod : 1000,
ledOffPeriod : 500
};
var notification1 = new tizen.StatusNotification(“SIMPLE”,
“Simple notification”, notificationDict1);
tizen.notification.post(notification1);
console.log(“notification sent from the button”);
} catch (err) {
console.log(err.name + “: ” + err.message);
}
return;
}
page.addEventListener(“pagebeforeshow”, function() {
okClickBound = onClickOK.bind(null);
notificationButton.addEventListener(“click”, okClickBound, false);
});
Thanks in advance,
BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio