Firebase cloud messaging fcm_options.link url not opening on click

Discussão em 'Angular' iniciado por anshul mahajan, Dezembro 22, 2024.

  1. I'm sending fcm message to the web application, I'm able to receive the message in background but when I click on alert, it does not open the URL in browser, everything is working fine its just the link that is not working.

    Here is the message I'm sending, please help

    {
    "notification": {
    "title": "Hello World",
    "body": "Enjoy your coffee"
    },

    "webpush": {

    "fcm_options": {
    "link": "https://weather.com/en-CA/weather/today/l/CAON4756:"
    }
    }

    "to" : ""
    }


    My firebase-messaging-sw.js file

    importScripts('https://www.gstatic.com/firebasejs/6.3.4/firebase-app.js');
    importScripts('https://www.gstatic.com/firebasejs/6.3.4/firebase-messaging.js');



    firebase.initializeApp({
    'messagingSenderId': ''
    });

    const messaging = firebase.messaging();

    Continue reading...

Compartilhe esta Página