sidyyy911

Results comments of sidyyy911

POST /fcm/send HTTP/1.1 Host: fcm.googleapis.com Content-Type: application/json Authorization: key=MyServerKey - intentionally removed Cache-Control: no-cache Postman-Token: 7422a5f0-eb5a-ada3-8f3e-709eec2682c4 {"to": "eslQUUSpxTM:APA91bG7zgoU63XZTF5vbaxNkFTu9DG3WB9JJHFKxLuKN1UBlZ0RkUB6lD-wzQtMQVfw2lW0HcWWsok7fuU2717CS7j9klzf_OU3RQvoNauBDeMkdaYy4MF2wRkFdpDMz2ybmOyQWwxX", "notification": {"title": "Portugal vs. Denmark", "body":"5 to 1" } } Used postman(for...

That solved my problem. Thanks a lot.

You need to use this function in the client side javascript for your webapp(the one which registers serviceWorker and requests notification permission from the user). This will capture any push...

If you would like to display notifications you can do one of two 1. Use non persistent notifications e.g. var notification = new Notification("Hi there!"); 2. Get the service worker...

You can try something like this Notification.requestPermission().then(function(permission){ if(permission==="granted") { var notif=new Notification("Hi there!!"); // similiar format as sw.showNotification(). Check //documentation console.log("Hi"); notif.onclick = function(event) { event.preventDefault(); // prevent the browser...

Background messages are handled by the serviceWorker which is standalone. For background messages your webapp is not in context so a relative url will not work. Try giving a webURL....

Hi, I wasn't able to get the time to recreate this scenario. But one of the possible reasons I was getting two messages could have been that I was registered...