Tuesday, November 1, 2016

Re: GWT Desktop-Notification

Hey Marcel,

Your project works fine with Chrome desktop but now Chrome mobile seems to require Service Workers to send notifications.

I have tried to implement it based on examples, it works with simple html projects but when I try to register a serviceworker from a GWT project I get the following error: Failed to register a ServiceWorker: No URL is associated with the caller's document

if ('serviceWorker' in navigator) {
   navigator
.serviceWorker.register('sw.js');
   navigator
.serviceWorker.ready.then(function(registration) {
      registration
.showNotification(title,
         
{ body: body, icon: icon }
     
);
   
});
}

Have you updated your project or may be have you more experience with serviceworkers?

Thanks,
Ricardo


On Friday, February 7, 2014 at 9:26:29 AM UTC+1, Marcel K wrote:
Hey,

after some coding with gwt i want to publish a component that i wrote. It's an api for desktop-notification and should work with Chrome, FF and Safari (according to https://developer.mozilla.org/en-US/docs/Web/API/notification#Browser_compatibility).

I would really appreciate if someone could take a look at it and maybe give me some advices ;) or.. maybe even use :)



Cheers
Marcel

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment