I was previousely using webkit notifications on my website but it seems to have deprecated, I am trying the rich notifications but they seem to be not working either. I tried almost all the available demos online but none of them work. Are the Rich notifications deprecated, if so what could be the possible ways of displaying desktop notifications in chrome. I checked the chrome flags and I coudnt find the rich notifications options.
This was the code I was trying for rich notifications
setInterval(timedpopup, 1000);
function timedpopup(){
chrome.notifications.create('report',{
type:'basic',
title:'hello world',
iconUrl: '',
message:'this is a message',
expandedMessage:'Hello World!!!!!!!!!',
priority:1,
buttons:[{title:'Cancel'},{title:'Got it'}],
isClickable:true
},function(){});
}
This gives the error: Uncaught TypeError: Cannot read property 'create' of undefined This is the code that was working earlier:
setInterval(timedpopup, 2000);
function timedpopup(){
webkitNotifications.createNotification("", "This is a message", "HELLO WORLD").show();
}
This gives error: Uncaught ReferenceError: webkitNotifications is not defined
I tried to check it on the chrome documentation but it doesnt say anything about rich notifications being deprecated.
Please let me know if there are any alternatives for notifications. Any input on this context is appreciated
Thanks