How to send firebase push notification in React| React push Notification |Firebase push notification

Поделиться
HTML-код
  • Опубликовано: 21 окт 2024

Комментарии • 71

  • @Hugomarangao-td8ep
    @Hugomarangao-td8ep Год назад +1

    Thank you so much for this video, it really help me to solve the problem in my project!!!!!

  • @greykrav1869
    @greykrav1869 4 года назад +14

    I forked the repo, followed his tutorial exactly. no browser notification was shown. it did not work.

    • @dinysanchez
      @dinysanchez 4 года назад

      You using chrome? You can try to check if you have turned on notification for chrome.

  • @nagendrasuryawanshi4100
    @nagendrasuryawanshi4100 3 года назад +3

    Got Error : DOMException: Failed to execute 'importScripts'

  • @Hugomarangao-td8ep
    @Hugomarangao-td8ep Год назад

    The notifications are arriving correctly but when you click on them instead of opening my site it opens a blanck page how do I solve this?

  • @faustinomaggioniduffy3045
    @faustinomaggioniduffy3045 3 года назад

    It´s necessary to do a class component?

  • @anupkaushik9370
    @anupkaushik9370 2 года назад

    Is this notification popups every time the user browse the website ?

  • @kshitijverma332
    @kshitijverma332 Год назад

    How do I get a notification when a change happens in Firestore?

  • @ahmedmahboub2199
    @ahmedmahboub2199 4 года назад +3

    7:30 where this 2 lines came from

    • @Avijit470
      @Avijit470 4 года назад

      you can go through description. source code is there

  • @MaximM999
    @MaximM999 3 года назад

    Firebase is easy, and it will not work in Safari, try implementing Apple push notifications xD

  • @mahlasurya
    @mahlasurya 4 года назад +1

    How can we use this in production so that we can send push notifications to all devices where our Web site is running?

  • @BaneZr994
    @BaneZr994 3 года назад

    Hello it seems that when i do yarn add firebase, i don't get a firebase route from which to import firebase, i can only install from firebase/app

  • @easylearnfrench
    @easylearnfrench 2 года назад

    it is not working for me. console log show me error

  • @sagarghosh3434
    @sagarghosh3434 3 года назад

    wil this token remain same or will b changed after reload ?

  • @hakanaki
    @hakanaki 3 года назад +1

    How do you programmatically send the notification. Say from the backend

    • @AVDojo
      @AVDojo  3 года назад

      You can setup firebase admin in your backend application

  • @rafaelalvescardoso1233
    @rafaelalvescardoso1233 3 года назад

    Doesn't work on ios devices?

  • @react.dev.28
    @react.dev.28 Год назад +2

    source code ?

  • @easylearnfrench
    @easylearnfrench 2 года назад +2

    can anybody helps me with the code? I did the same but it catches error
    import React, { Component } from "react";
    import firebase from "./firebase";
    export default class App extends Component {
    constructor(props) {
    super(props);
    this.state = {};
    }
    componentDidMount() {
    const messaging = firebase.messaging();
    messaging
    .requestPermission()
    .then(() => {
    return messaging.getToken();
    })
    .then((token) => {
    console.warn("Token : ", token);
    })
    .catch(() => {
    console.log("Error");
    });
    }
    render() {
    return this is my first fcm notification.;
    }
    }

  • @anupkaushik9370
    @anupkaushik9370 2 года назад +1

    Source code URL is fake

  • @Aladinyo_93
    @Aladinyo_93 4 года назад

    Registration failed - push service error I keep getting this error and everything is done correctly

  • @AbhishekGanotra
    @AbhishekGanotra 4 года назад +2

    Not getting any notification dude ,followed exactly same thing

    • @AbhishekGanotra
      @AbhishekGanotra 4 года назад +3

      But getting the token though

    • @AVDojo
      @AVDojo  4 года назад

      The probably notification is turned off in your browser

    • @AbhishekGanotra
      @AbhishekGanotra 4 года назад +2

      @@AVDojo No the notifications are allowed but not getting ??

    • @AbhishekGanotra
      @AbhishekGanotra 4 года назад +1

      It's working but it's not apt to receive token everytime and put in firebase console manually , can you tell how after receiving the token we can automatically send it from our react app and the only thing then we need to do is send push notifications from the console

    • @poopin8064
      @poopin8064 2 года назад

      @@AbhishekGanotra i am not receiving notification too, though i am getting token. (sorry it has been 1 year since you comment)

  • @akhilharwadekar5009
    @akhilharwadekar5009 3 года назад

    can u make a similar video on Quasar?

  • @tvkiduniya6685
    @tvkiduniya6685 2 года назад

    Will this code work for react native?

  • @poopin8064
    @poopin8064 2 года назад

    Notifications are not coming to my website

  • @hungry_traveller31
    @hungry_traveller31 4 года назад +3

    Bro ek live MERN STACK p project sikha do

  • @jindev4901
    @jindev4901 4 года назад +2

    Great Tutorial. How can I create notification on click?

    • @AVDojo
      @AVDojo  4 года назад

      you've to handle it differently. You need to make one Admin app to send notification

    • @jindev4901
      @jindev4901 4 года назад +1

      How can I create admin page?

    • @AVDojo
      @AVDojo  4 года назад

      You can check this one out rharshad.com/web-push-notifications-react-firebase/

    • @jindev4901
      @jindev4901 4 года назад +1

      @@AVDojo Great!

  • @juhisingh4442
    @juhisingh4442 3 года назад

    it show error in firebase

  • @timelapse5687
    @timelapse5687 3 года назад

    Recommended

  • @bumuthudilshan5395
    @bumuthudilshan5395 4 года назад +1

    Will this work in react native?

    • @AVDojo
      @AVDojo  4 года назад

      ofcourse

  • @movilui7060
    @movilui7060 4 года назад

    works for ios
    ?

  • @rezaandriansyah279
    @rezaandriansyah279 3 года назад

    thanks bro..

  • @viczking8520
    @viczking8520 4 года назад +2

    didn't work

    • @AVDojo
      @AVDojo  4 года назад

      You're doing something wrong

    • @viczking8520
      @viczking8520 4 года назад

      @@AVDojo I got the message that Oauth token was not authenticated or sth

  • @DaliborHomola
    @DaliborHomola 4 года назад

    Thanks for the instructions, but I also get a token in the console, but I don't get notifications. I did everything right from the video, I have also turn on notifications... Any update how to fix? Anyone :)

    • @eliyagervas8680
      @eliyagervas8680 Год назад

      Possibly notification goes to Windows action center, you can. Check on bottom toolbar right-end side

  • @swetabose66
    @swetabose66 4 года назад +2

    👌

  • @reksmeymom1428
    @reksmeymom1428 4 года назад +1

    I got console print error

    • @AVDojo
      @AVDojo  4 года назад

      mention the exact error

    • @reksmeymom1428
      @reksmeymom1428 4 года назад

      @@AVDojo I can't get the token, the code execute in catch block and got error message

    • @easylearnfrench
      @easylearnfrench 2 года назад

      @@reksmeymom1428 me too

  • @mdnazmulhossain1100
    @mdnazmulhossain1100 4 года назад

    importScripts(`htt
    ps://www.gstatic.com/configjs/7.13.2/firebase-firebasePushNotification.js`)
    where you get this url .please tell me

  • @minhthongvo5989
    @minhthongvo5989 3 года назад

    Thank you so much for this video, it really help me to solve the problem in my project!!!!!