Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Add FAQ on display notification from window #75

Open
gauntface opened this issue May 30, 2017 · 2 comments
Open

Add FAQ on display notification from window #75

gauntface opened this issue May 30, 2017 · 2 comments

Comments

@gauntface
Copy link
Owner

No description provided.

@FluorescentHallucinogen
Copy link
Contributor

@gauntface

Could you please add that new Notification(title, options) is not (and, seems, never was) supported by Chrome for Android? See https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/BygptYClroM.

If I use Firebase Cloud Messaging and want to display received messages, handled through the onMessage callback in index.html, not the setBackgroundMessageHandler callback in firebase-messaging-sw.js, as standard browser notifications in Chrome for Android, what code should I use instead of the following one?

messaging.onMessage((payload) => {
  new Notification(payload.notification.title, payload.notification);
});

@FluorescentHallucinogen
Copy link
Contributor

@gauntface PTAL.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants