Angular + Firebase Cloud Messaging Push Notifications 🔔 Part 1

Поділитися
Вставка
  • Опубліковано 8 вер 2024
  • Hello friends, in this video we are gonna look for an Angular + Firebase Cloud Messaging Push Notifications
    Part 2:- • Angular Custom Messagi...
    post link:- / 1bn8n4tox3
    If you want to look into the project than here is the GitHub link:- github.com/may...
    Background Music
    Track: Tritan - Hollow Life (feat. Ratfoot) [NCS Release]
    Music provided by NoCopyrightSounds.
    Watch: • Tritan - Hollow Life (...
    Free Download / Stream: ncs.io/HollowLife
    Hope This Video Is Helpful For You
    ✅Don't Forget to LIKE 👍 SUBSCRIBE 🔔️️️ SHARE ↗️
    ↪️bit.ly/2Kze2oi
    ► Connect With Us! ◄
    Facebook - bit.ly/2tbOg3b
    Google+ - bit.ly/2jrWz6g
    Instagram - bit.ly/2tbR14z
    Reddit - bit.ly/2J5Vqfm
    Twitter - bit.ly/2ICJFfb
    Discord - bit.ly/2N8zCnt
    ★★★Watch my most recent videos playlist★★★
    Kali Linux - goo.gl/36M3JD
    Python Coding - goo.gl/dCtyrS
    Java Coding - goo.gl/oxFo8W
    Deep Web - goo.gl/7ueKNh
    Basic Computer - goo.gl/kwFXM3
    Hacking - goo.gl/vjT916
    Games Benchmark - goo.gl/eshw3T
    Gaming - goo.gl/mLuQwf
    Notepad Tricks -goo.gl/3uapMJ
    CMD Tricks - goo.gl/x1KH8C
    Facebook Tricks - goo.gl/1JV9Fz
    Problem Solved - goo.gl/eJwjXq
    Gmail Tricks - goo.gl/fSpbaB
    And talking about subscribing, please subscribe to my channel,
    if you enjoyed this video and want more how-to, Thanks so much for watching!

КОМЕНТАРІ • 85

  • @dorlevi3
    @dorlevi3 4 роки тому +6

    For messaging problem:
    npm uninstall @angular/fire
    npm i @angular/fire@5.1.1 --save

    • @marisho8397
      @marisho8397 3 роки тому +2

      Got a bunch of these errors "Module '\"../../../firebase\"' has no exported member 'User'.

    • @onikasharma1516
      @onikasharma1516 3 роки тому +2

      after install fire@5.1.1 package every thing is ok but when i serve the code i got an error- Error: node_modules/@angular/fire/messaging/messaging.d.ts:2:10 - error TS2305: Module '"firebase/app"' has no exported member 'messaging'.

    • @VishalTheK
      @VishalTheK 2 роки тому

      @@onikasharma1516 could you get it resolved?

  • @ajaykharat9226
    @ajaykharat9226 Рік тому +1

    Thanks for wonderful tutorial. I can see both message on Foreground and Background using firebase 9.22.0 and angular 16..

  • @alihosseinkhani2671
    @alihosseinkhani2671 Місяць тому

    u helped me a lot, thank you

  • @uresh88
    @uresh88 4 роки тому +1

    Thank you very much!!!! I was stuck in push notification.

  • @luharlajja9291
    @luharlajja9291 Рік тому +1

    very usefull video

  • @marcosradix1
    @marcosradix1 4 роки тому +2

    Incredable well explained, many thanks!

  • @nareshm9746
    @nareshm9746 2 роки тому +1

    Love you Man. You are a God

  • @MuhammadDanialShaukat
    @MuhammadDanialShaukat 3 роки тому

    This is very awesome and helpful tutorial. But my question is that please help us to get the notification while browser is inactive or in background. Please any one help me

  • @GautamKumar-uideveloper
    @GautamKumar-uideveloper 3 роки тому

    Awesome video, Can you please make a video on push notifications with nativescript + angular, it would be so helpfull, Thankyou..

  • @Muni2intell
    @Muni2intell 4 роки тому +2

    messaging is a not know property this error i am getting in service worker

  • @aqc33020
    @aqc33020 3 роки тому +1

    Does anybody know how to open my web when clicking the notification, or do something when click the notification? on_click is not working for me

  • @talhaashraf1727
    @talhaashraf1727 4 роки тому +4

    Hi im getting this error
    A bad HTTP response code (404) was received when fetching the script.
    messaging.service.ts:35 Unable to get permission to notify. FirebaseError: Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker for scope ('localhost:4200/firebase-cloud-messaging-push-scope') with script ('localhost:4200/firebase-messaging-sw.js'): A bad HTTP response code (404) was received when fetching the script. (messaging/failed-service-worker-registration).
    at WindowController. (localhost:4200/firebase-messaging.js:2418:45)
    at step (localhost:4200/vendor.js:190880:23)
    at Object.throw (localhost:4200/vendor.js:190861:53)
    at rejected (localhost:4200/vendor.js:190852:65)
    at ZoneDelegate.invoke (localhost:4200/polyfills.js:377:30)
    at Zone.run (localhost:4200/polyfills.js:136:47)
    at localhost:4200/polyfills.js:870:40
    at ZoneDelegate.invokeTask (localhost:4200/polyfills.js:412:35)
    at Zone.runTask (localhost:4200/polyfills.js:180:51)
    at drainMicroTaskQueue (localhost:4200/polyfills.js:582:39)

    • @nouhaabdelkefi8360
      @nouhaabdelkefi8360 4 роки тому

      hi , i got same problem . do you found any solution ?

    • @pudulls
      @pudulls 4 роки тому

      I tried with the number that appears on console and it worked!

    • @estudia9047
      @estudia9047 3 роки тому

      @@pudulls I didnt got it, how did you resolve it?

    • @pudulls
      @pudulls 3 роки тому

      @@estudia9047 I remember that the error appeared on the browser console and there was a number I copied that number and pasted in the firebase config file.. if it does not work try with
      github.com/firebase/firebase-js-sdk/issues/2582

  • @pudulls
    @pudulls 4 роки тому

    Thank you, you helped me a lot!

  • @pooja8747
    @pooja8747 4 роки тому +1

    hey i have same versions of firebase as mentioned but still could not find notification in foreground, no error as well, but no console of payload also

    • @qazimuneeb9821
      @qazimuneeb9821 4 роки тому

      have u find the solution? im facing this issue

    • @aqc33020
      @aqc33020 3 роки тому

      try this :
      receiveMessage() {
      this.angularFireMessaging.messages.subscribe(
      (payload: any) => {
      // Para activar la notificacion en fg
      const NotificationOptions = {
      body: payload.notification.body,
      data: payload.data,
      icon: payload.notification.icon
      }
      navigator.serviceWorker.getRegistration('/firebase-cloud-messaging-push-scope')
      .then(registration => {
      registration.showNotification(payload.notification.title, NotificationOptions);
      });
      // console.log("new message received. ", payload);
      this.currentMessage.next(payload.data);
      });
      }

  • @jroamindia1754
    @jroamindia1754 4 роки тому

    THANKS saved my day too

  • @Fuinhaa
    @Fuinhaa 5 місяців тому

    If I send a message to a group of people, can I make it so that only that group of people receive that notification?

  • @SandeepSingh-sg8zh
    @SandeepSingh-sg8zh 3 роки тому

    Very helpful video
    is there any way to fetch the background notifications too in web app?

  • @ing.zdenekpozner4110
    @ing.zdenekpozner4110 3 роки тому +1

    Life saver

  • @ourHappyFamily69
    @ourHappyFamily69 2 роки тому

    can you please add one more video for push notifications based on location

  • @henrikvarga1789
    @henrikvarga1789 2 роки тому

    angular import of modules do not work
    Module '"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule' ...

  • @FaczutMon
    @FaczutMon 4 роки тому

    How can I receive notify both from Background and Foreground? I don't want my notify to pop at the corner of my screen but then display nothing on my website.

  • @adibouachani3359
    @adibouachani3359 4 роки тому

    Hi, I have a dashboard project with angular 8 and my friend have a mobile application project with Kotlin.
    I want to send a notification from my dashboard to her mobile application.
    My question is how can I send the notification? Should I do the same as the tutorial?

    • @mightyghosthack
      @mightyghosthack  4 роки тому

      I don't think this thing goona work In order to send notification on mobile devices you need to add such feature or i can say you need to implement notification feature in that sdk once it done all you need to create server which help you to send notification to ur android device and lastly integrated dashboard with that server so with the help of UI + server you will easily able to send the notification
      But for notifications you need to look for mobile application sdk check on internet how you are going to send notification on mobile devices

  • @jroamindia1754
    @jroamindia1754 4 роки тому +2

    Property 'messaging' does not exist on type 'AngularFireMessaging'.

    14 this.angularFireMessaging.messaging.subscribe(
    getting this error

    • @michaelewe8683
      @michaelewe8683 4 роки тому +1

      same here

    • @jroamindia1754
      @jroamindia1754 4 роки тому

      @@michaelewe8683 u can download project from git hub and create new project copy each and every thing related to frebase to ur project...and comment this Property 'messaging' does not exist on type 'AngularFireMessaging'.
      works fine for me now

    • @MizSterHeng
      @MizSterHeng 4 роки тому +1

      @@jroamindia1754 hi what things that related to firebase? i try to copy file from git hub to my project , yet it still error about 'messaging' does not exist...

    • @jroamindia1754
      @jroamindia1754 4 роки тому

      @@MizSterHeng yes error is still there I think some of the methods are depricated.. So search lot on Google after some where it is written that... There no need to bind methods which showing error so i commented that.. And its work fine

    • @MizSterHeng
      @MizSterHeng 4 роки тому

      @Random Dev how can I install specific version of angular fire? can u give me the command?

  • @jamalhaider1060
    @jamalhaider1060 Рік тому

    I can't see message on Foreground but i see message in Background. how i see Foreground message ?

  • @johnpaulolim6265
    @johnpaulolim6265 3 роки тому

    I received a notification for foreground and in background but in background i received the notification to service worker how can i send it to my component?

    • @aqc33020
      @aqc33020 3 роки тому

      were you able to solve this?

  • @cricketloverz9026
    @cricketloverz9026 3 роки тому

    @Might ghost hack if we use it with ionic cordova angular fire can we get notification when we build apk and use it

  • @ryngakumaran5919
    @ryngakumaran5919 4 роки тому +1

    hi notification not receiving in Foreground ? any help ?

  • @mrinmoyeepanja867
    @mrinmoyeepanja867 3 роки тому

    Property 'subscribe' does not exist on type 'Promise & ((...args: unknown[]) => Promise) & ((...args: unknown[]) => any)'.

  • @vivekguna9795
    @vivekguna9795 3 роки тому

    Downgrading firebase version not working for angular 11.Any solution for this as notification is not getting received in background through service worker.

    • @unnikrisb
      @unnikrisb 3 роки тому

      try to use with 8.8.0 version.. It's working for me in Angular 11

  • @nouhaabdelkefi8360
    @nouhaabdelkefi8360 4 роки тому

    Hi im getting this error
    A bad HTTP response code (404) was received when fetching the script.
    messaging.service.ts:35 Unable to get permission to notify. FirebaseError: Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker for scope ('localhost:4200/firebase-cloud-messaging-push-scope') with script ('localhost:4200/firebase-messaging-sw.js')

    • @estudia9047
      @estudia9047 3 роки тому

      HI, I have the same problem :/ did you find a solution?? Ive been trying to fix it, but i haven't been lucky :(

  • @datatalksbyjunaid4292
    @datatalksbyjunaid4292 3 роки тому

    Request permission gets error when hosting the site....

  • @ashishsubba7427
    @ashishsubba7427 4 роки тому

    Popup is not showing. I have cloned your project from GitHub but foreground popup is not showing.

    • @mightyghosthack
      @mightyghosthack  4 роки тому

      there is a service worker which is gonna show you the popup when your browser is open but your website is not active on tab
      for foreground the only message is going to display over there if you want to display popup on foreground also just like service worker you want to use notification system for that

  • @jroamindia1754
    @jroamindia1754 4 роки тому +2

    sir please update your video..there is lot of things that change now

    • @badrzak4478
      @badrzak4478 4 роки тому

      what the things that have changed

    • @diegoarredondo1291
      @diegoarredondo1291 3 роки тому

      @@badrzak4478 the code that goes in the Messaging Service constructor, for example. Also you don't get to see the notification logged on the console anymore

  • @RAYFF
    @RAYFF 4 роки тому +1

    First Comment

  • @ilthizamimtiyas3482
    @ilthizamimtiyas3482 3 роки тому

    Is 'token id' is unique for each browser?

  • @amitjagtap7194
    @amitjagtap7194 4 роки тому

    i want to show popup for foreground also. can you please help me to resolve this

    • @mightyghosthack
      @mightyghosthack  4 роки тому

      sure stay tuned i will upload video on that case also

  • @mohsenlabib4115
    @mohsenlabib4115 4 роки тому

    how to use this with topic in angular

  • @tungthanh5547
    @tungthanh5547 4 роки тому

    how to push notify in foreground mode

  • @Boykub1111
    @Boykub1111 4 роки тому

    This is good tutorial but why foreground not work for me ? can you please help me to resolve this ?

    • @mightyghosthack
      @mightyghosthack  4 роки тому +1

      What kind of issue you are facing

    • @Boykub1111
      @Boykub1111 4 роки тому

      @@mightyghosthack The foreground does not change when I'm click send postman it's not notify and foreground still null.

    • @qazimuneeb9821
      @qazimuneeb9821 4 роки тому

      @@Boykub1111 is your issue fixed? im facing same issue

    • @CubeAmaterasu
      @CubeAmaterasu 4 роки тому

      @@qazimuneeb9821 I have this same issue

  • @neethuvijayan9343
    @neethuvijayan9343 4 роки тому

    how to send push notification from one server to another?

  • @mateoloaizarios2476
    @mateoloaizarios2476 4 роки тому

    Not working in macOS in chrome. Any ideas?

    • @mightyghosthack
      @mightyghosthack  4 роки тому +1

      reason could be version compatibility or have you check the notification permission on browser

    • @mateoloaizarios2476
      @mateoloaizarios2476 4 роки тому

      @@mightyghosthack Yes, the problem was in the browser notification settings. Thank you!

    • @mateoloaizarios2476
      @mateoloaizarios2476 4 роки тому

      But it doesn't show me the notification in fareground : /

    • @mightyghosthack
      @mightyghosthack  4 роки тому

      For foreground check firebase js version and ur imported firebase module version same or not

  • @akmalkrmv
    @akmalkrmv 4 роки тому

    step 1: Go to any blog
    step 2: Copy everything step by step
    step 3: Play steps in google translate voice app
    step 4: Upload to youtube
    step 5: ...
    step 6: Profit... ?

  • @unnikrisb
    @unnikrisb 3 роки тому

    Thanks for wonderful tutorial. I can see both message on Foreground and Background using firebase 8.8.0 and angular 11..

  • @sumitmahajan5730
    @sumitmahajan5730 4 роки тому

    how to use this with topic in angular