Questions tagged [web-notifications]

The Web Notifications API provides a way for a web application to show a platform-level notification to a users — outside of a browser’s viewport and regardless of whether the web application that generated the notification is in the currently-active tab/window.

Web Notifications API for end-user notifications provides a way to alert users — outside the context of a web page — of an occurrence such as the delivery of an e-mail message.

https://notifications.spec.whatwg.org/

145 questions
1
vote
1 answer

fcm onmessage not triggered

I see this question is repeatedly asked, I went through many posts yet failed to achieve it with 9.6.1 I get a notification on my windows notification bar. What I need is to log the message in the console and later do some action on…
Aadam
  • 1,521
  • 9
  • 30
  • 60
1
vote
1 answer

Is there a way to Jest test and spy on Web Notification API?

Trying to test my code that uses Notification API. I don't think I'm mocking it correctly. global.Notification = ({ requestPermission: jest.fn().mockImplementation(()=> { console.log('reached here') //never logged return…
IamMowgoud
  • 308
  • 4
  • 13
1
vote
0 answers

Web client receiving duplicate test messages from Firebase Cloud Messaging console

Just getting started using Firebase and their Cloud Messaging solution, and I am getting a weird occurrence of two push notifications being received whenever I use the Firebase console to send a test message to my client. I am following the steps on…
1
vote
2 answers

Angularjs notification showing twice if on 2 browser tabs

I am using angular-web-notification . My problem is that if I open 2 browser tabs and then the messages are received, I get to see two instances of notifications shown. Below is the reference code. webNotification.showNotification(title, { …
user14325562
1
vote
1 answer

How to schedule recurring web notification in React locally?

I'm trying to build a React web application that would notify the user every day on a set time without the need to be connected to a server. For example: The user sets that he/she wants to be notified every day at 5 pm. The application would then…
1
vote
1 answer

FCM push notification sent when browser is closed and not showing when it is reopened

Web push notification is working fine when browser is open. But with browser closed not sure if notifications are queuing up or not as when its reopened the notification is not showing. I tried to set the TTL but its still not working so I think the…
1
vote
0 answers

Handling csrf security when using fetch API to send a POST request

I'm implementing web notifications for a Django/Python web app. One of the requirements is to log the act of "receiving notification" by the target user. To log this metric, I'm using the fetch API like so: function log_notif_reception(status_code)…
Hassan Baig
  • 15,055
  • 27
  • 102
  • 205
1
vote
2 answers

Symfony Web Notifications

I am using Symfony 4.2 + vue.js on my website. I want to send web notifications (not browser notifications) something similar to Podio / Facebook notifications. I had searched socket.io but since it is node I think I cant use it with Symfony. Not…
user10960419
1
vote
1 answer

Web App Push Notification, Unable to Push the notification on browser

I have been trying to push notification on my web app. I have been following google's codelabs for assistance and I have been successful until I reached 'Handle a Push Event' part. I did exactly what they had mentioned, where could I possibly go…
1
vote
1 answer

Firebase push web notifications for anonymous users

Is it possible to push web notification in Firebase for anonymous users with using just the UID because there will be no tokens for anonymous authentication.
1
vote
1 answer

Web Notification Push Subscription what to do with auth?

A Web Notification subscription post back might give this data: { "customerid": "123456", "subscription": { "endpoint": "https://updates.push.services.mozilla.com/push/v1/gAAAA…", "keys": { "p256dh":…
patrick
  • 16,091
  • 29
  • 100
  • 164
1
vote
0 answers

Firebase error on web token notification

I am trying to send the notification to the specific user using firebase. Going on with tutorials, I could not solve this in the beginning phase. Here is my js: var config = { apiKey: "", authDomain: "", databaseURL: "", projectId:…
1
vote
1 answer

Synchronise Web Notifications on Multiple Browsers/Devices

How do I synchronise Web Notifications on multiple Browsers/Devices? Assume my server would be able to know whether user has accessed a notification within their account on my web app (and which device they accessed it from.) Then is it possible to…
1
vote
1 answer

How to create web push notification from server to all notification granted users?

I am using Angular CLI latest version and NodeJS, want to archive web push notification, we got few documentations but gives error, May I know any Documentation for web push notification which supports angular and nodejs. The requirements are send…
151291
  • 3,308
  • 7
  • 48
  • 81
1
vote
1 answer

Website notification to each user only once

I am new to this so if it's a silly one please consider. I have a scenario where I am creating articles from admin and showing them to end users in front-end as website notification. The problem here I am facing is I am not able to restrict…
Arpit
  • 47
  • 1
  • 7