I will create a Blazor Webassembly PWA. The server should send a notification to a mobilephone and the message should displayed outside of the browser such as when you receive an email from outlook. Is that possible?
I will create a Blazor Webassembly PWA. The server should send a notification to a mobilephone and the message should displayed outside of the browser such as when you receive an email from outlook. Is that possible?
I believe it works the same as in pc. But it doesn't seems easy. You may check out: https://webpushdemo.azurewebsites.net
I'll probably get dinged for this, BUT, here's the link to getting this all setup! https://github.com/dotnet-presentations/blazor-workshop/blob/master/docs/09-progressive-web-app.md#sending-push-notifications
Basically you have to configure the PWA to request notification access, then you have to setup the server/client for sending the notifications. I have not yet implemented this, but it is on my list to be added to a production app soon.
Yes it is possible with Browsers support. Check out HTML5 Notification API it should work on Mobile as well. There is a "simple" notification and a bit more complex where you can even create custom events (buttons with custom code to run). But it is somewhat complicated and have to use ServiceWorkes as well...
One more drawback it requires user consent to show Notifications!
There is a wrapper component library for both types of HTML Notification APIs you can use this Nuget. You can even try it out with a demo app.
NOTE: this component only provides a wrapper for HTML Notification APIs to prompt messages. It is not sending/subscribing to any massaging or PUSH events. So it is not equivalent with PUSH notifications. For that you have to have iOS or Android applications and register for Push services, etc...
