Push notifications not working in Chrome for angular-pwa-course - push-notification

I need desktop notification. So I have integrated The Angular PWA series course i.e. https://blog.angular-university.io/angular-push-notifications/. I am able to get push notification in Firefox but in chrome I am not getting any push notifications.
Operating System: Linux
Node Version:10.8.0
web-push Version:3.2.5
Chrome :Version 72.0.3626.119

Related

Flutter Notification Sound for IOS Apps

I want to set custom sound to notification in my application which using firebase notification.
In android worked perfectly, but in IOS not working. I put audio file in ios/runner, but notification received silently.

Migrating from Socket.io to Firebase Cloud Messaging

We currently have a hodgepodge of messaging systems. For mobile we were using Ionic Push cloud service, and for desktop we are using socket.io+desktop notifications. We recently moved our mobile push notifications to Firebase cloud messaging. We want to move our desktop notifications as well. From the docs, it seems like FCM works with recent versions of Chrome and Firefox. Safari supposedly supports push via APNs.
Is it possible for FCM to use the existing desktop notifications for push?
Or maybe I can use FCM just to retrieve push notifications across all browser and then use the desktop notifications libraries myself to display the message. I'm just a little confused by the landscape of types of pushes to browsers and desktops.

Push notifications in Apple Safari with FCM

We implemented push notifications using FCM in chrome and firefox and it worked fine, but Safari doesn't support Service Workers which is mandatory for FCM.
Did anyone deal with this kind of issues? any suggestions?
While Service Workers now work on Safari, they are not enough.
The documentation says:
The FCM JavaScript API lets you receive notification messages in web apps running in browsers that support the Push API. This includes the browser versions listed in this support matrix.
So the ability to receive messages through FCM depends on the browser implementing the Web Push API, which Web Kit does not.
Safari is built on Web Kit, so doesn't support web push, so that means that Safari can't receive FCM notifications. All browsers on iOS devices are also built on Web Kit (as that is a requirement from Apple), so FCM won't be able to receive messages in any of them either
If you want to test whether the environment your code runs on can receive messages from FCM, you can use this snippet of code:
if (firebase.messaging.isSupported())
...
}
Update (2023-02-16): WebKit.org just announced support for Web Push in iOS/iPadOS 16.4 beta 1. We're investigating whether this also impacts Firebase Cloud Messaging's ability to deliver to devices with this version.
Safari still does not support Web Push API, thus Firebase Cloud Messaging service.
Here is supported browsers in Firebase:
https://firebase.google.com/support/guides/environments_js-sdk#browsers
I'd suggest using .isSupported() instead of other solutions.
if (firebase.messaging.isSupported())
const messaging = firebase.messaging();
}
See the documentation for details on .isSupported().
I'm not sure about this new Safari and Service Workers situation, but I tried to implement FCM push-notifications in my iOS app and had to experience that you need an APN (Apple-Push-Notification) certificate first. I'm not sure if this is needed if you're working with Safari, but I could imagine that Apple also wants it's push notifications first to be redirected to the APN servers.
Apple says that Safari 16 (macos) should now support Push API but I didn't manage to make push API notifications work correctly. I tried firebase messaging web v9 (which should be a wrapper over Push API from what I understand) and it seems to work in background (when delivered by the service worker) but in foreground only receives notifications 3 times, then it stops working.
FCM doesn't support Safari browser.
If you want to integrate PUSH notification for Safari browser, follow this link. Safari has its own mechanism for it.
https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/PushNotifications/PushNotifications.html#//apple_ref/doc/uid/TP40013225-CH3-SW1

Is a Firebase Notification Received for a web app running on a mobile browser in the background?

The natural way to use Firebase on mobile is using Android or iOS.
However, I'm in this situation where a client who developed a web app wants to receive push notifications when:
The web app runs on a mobile browser
The mobile browser app is in background
Is that possible?
Note: According to Firebase Documentation, client web apps can receive push notifications when they are in background, but I'm not sure if that extends to web apps running on a mobile browser in background.
Yes, you can receive push notifications on your mobile even when your browser is not open, but you need to enable it by pressing Allow when prompted, as below.

Launch application automatically from a push notification on Windows 10 Mobile?

This is a reboot of question Launch application automatically from a push notification on Windows Phone 8 but for Windows 10 Mobile.
Is there any positive development on this in Windows 10 Mobile?
It's basically the same as on Windows Phone 8.1.
You cannot directly launch an app into the foreground on receiving a push notification, but you can trigger a background task by push notification. The task can then decrypt the payload and fire a toast and tile notification to display it to the user. For a long message the toast can let the user launch the app to view the full message.
See Background tasks triggered by raw notifications in MSDN.
The Raw notifications sample demonstrates this for Windows and Windows Phone 8.1.

Resources