unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.93k stars 724 forks source link

[WASM] Add support for Toast notifications #4647

Open peternary opened 3 years ago

peternary commented 3 years ago

What would you like to be added:

Implement Toast support for WASM

Why is this needed:

Toasts are an ideal way to display brief notifications

For which Platform:

Anything else we need to know?

jeromelaban commented 3 years ago

Thanks for the report. What kind of toast notifications do you need ? Is it in-app, when the app is running, or as a push notification ?

peternary commented 3 years ago

We're specifically looking for support for being able to call,

ToastNotificationManager.CreateToastNotifier().Show(toastNotification);

jeromelaban commented 3 years ago

Thanks.

Note for contributors

The W3C notifications API may be of interest to build this feature: https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API

MDN Web Docs
Using the Notifications API
The Notifications API lets a web page or app send notifications that are displayed outside the page at the system level; this lets web apps send information to a user even if the application is idle or in the background. This article looks at the basics of using this API in your own apps.
pkar70 commented 3 years ago

I think such PR (WASM ToastNotificationManager.CreateToastNotifier().Show(toastNotification) would be very hard to merge. Exactly this for Android waits since February :)