Push Notifications to Your Web Application in Browser Using Google Firebase (Cloud Messaging)

Push Notifications to Your Web Application in Browser Using Google Firebase (Cloud Messaging)

The Art Of Coding

1 год назад

49,555 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

James
James - 19.07.2023 05:11

Thanks for sharing this! Great tutorial. Anyone struggling to see the test notification, having added a blank 'firebase-messaging-sw.js', look at your Mac OS settings (if on a mac) as you may be blocking your notifications in other ways.

Ответить
Jhonxd
Jhonxd - 11.07.2023 20:45

hey bro, thank you so much for this video <3

Ответить
johann bogota
johann bogota - 10.07.2023 19:19

This code still work? because I have had problem with the browser chrome to get push notification? anyone knows or have the solution?

Ответить
Đạt Nguyễn Đức Chí
Đạt Nguyễn Đức Chí - 01.06.2023 07:26

where is your firebase-messaging-sw.js file

Ответить
Utkarsh Yeolekar
Utkarsh Yeolekar - 26.04.2023 07:27

Does this work on safari 16 ? As safari 16 now supports the push messaging.
For me on safari, I does get the notifications, but after 3 notifications, it revokes the permission, I need to go again with the workflow of requesting the permission.

Even when I am showing the notification, it revokes the permission

Ответить
Utkarsh Yeolekar
Utkarsh Yeolekar - 26.04.2023 07:22

Does this work on safari 16 ? As safari 16 now supports the push messaging.
For me on safari, I does get the notifications, but after 3 notifications, it revokes the permission, I need to go again with the workflow of requesting the permission.

Even when I am showing the notification, it revokes the permission.

Ответить
Johannes G
Johannes G - 07.04.2023 14:40

Doesn´t work... I get the token I can paste it into firebase but he notification doesn´t show up.

Ответить
Okoli Ugo
Okoli Ugo - 06.03.2023 10:19

I set up a foreground listener on react, and i can see the notification in developer console, but the listener doesnt console the payload as it should. Anyone experience this?

Ответить
Ayomide Ojo
Ayomide Ojo - 25.02.2023 13:37

Came for the tutorial; stayed for the music! 🔥

Ответить
Vanessa Ibale
Vanessa Ibale - 27.01.2023 12:24

Hi, thank you for the tutorial, it all worked out except for the last part: the notification itself. I already tried closing the localhost site, allowing to display notifications, and it still doesnt work. Hope you can help me out on this :(

Ответить
JPG
JPG - 25.01.2023 00:27

Howdy, i found your clip very helpful however i'm getting the error
FirebaseError: Messaging: We are unable to register the default service worker. The answers i've looked for in stack overflow all point out that i need to move it inside the public folder but if i move it inside the public folder i get the error saying i can't import stuff outside the src directory and this seems to be a create-react-app issue. Do you know of a fix for this, thanks in advance!

Ответить
Johan's Music Learning Channel
Johan's Music Learning Channel - 17.01.2023 05:54

really really thanks. I want to get use to reading documentation / learn to learn through documentation. documentation are alway scary and intimidating. but following this tutorial help me to tackle future problems as well. if you like to make more on firebase, I would love to see it as well.

Ответить
Mohsen Hassani
Mohsen Hassani - 28.12.2022 20:24

many thanks for the github repo

Ответить
Nataniel Fogiatto
Nataniel Fogiatto - 21.11.2022 20:51

Here for me it keeps warning that Notification permission granted however, the whole page hangs, and the key does not appear... What can it be?

Ответить
Khai Dang N. VN.Danang
Khai Dang N. VN.Danang - 17.11.2022 07:12

`Notification is not defined` - Can u help me ?? pls , thanks

Ответить
Bart Sprengelmeijer
Bart Sprengelmeijer - 16.11.2022 13:20

Thanks! Helped me out

Ответить
trung pham duc
trung pham duc - 18.10.2022 19:49

I `ve got the register token but i cannot receive notification. Please help me

Ответить
Indra Nugraha
Indra Nugraha - 17.10.2022 21:51

How to add push notifications on other people's websites? Thank you

Ответить
KhwbHawj Family Live Channel
KhwbHawj Family Live Channel - 05.10.2022 10:32

this is my error: An error occurred while retrieving token. FirebaseError: Messaging: We are unable to register the default service worker. (how can i fixed it)

Ответить
Simon
Simon - 07.09.2022 15:40

Hey, thanks for your tutorial. I got the key and allowed notification, but didn't get the message when sending a test message from firebase. Do you know what the reason is?

Ответить
React Team Wdp
React Team Wdp - 09.08.2022 15:23

thank you so much sir

Ответить
Shabbir Nuruddin Bawaji
Shabbir Nuruddin Bawaji - 19.07.2022 12:25

I needed some help in this. I have followed the same steps as you have, but I am not getting the notification. I have even cloned your code and made the necessary changes about the config and the vapid key, but still I am not getting any notifications. gcm-internal shows that there is some data that is received.

Ответить