Notification Implementation In blazor Server Side Web application - blazor-server-side

How can I achieved notification in my Blazor Server Side Web application using Azur SQL server. Whenever Database table new entry occurred I want to show notification in my web page to all users or particular user.

Yes it is possible but requires "custom" feature implementation. It's not a huge task you need only a WebSocket channel to push messages. Since you have Server side Blazor it is already doing it with SignalR Hubs (extra functionality over WebSocket).
Here is some MS docs for Blazor + SignalR (some of the code will already in your app since it's Sever side Blazor).
hubConnection.On<string>("TableUpdate", (tableName) =>
{
//Prompt some Alert, or Notifications here...
StateHasChanged();
});
Once you set up your Hub connection you can push status updates to the clients (to all Clients.All.SendAsync() or targeting some clients Clients.User(userId)). You can use this Nuget also docs and demo available. To prompt one of the following notifications:
Alerts
Toast messages
HTML5 notification

Related

How to handle push notification when application is killed

Pardon me if this question has been asked before, I just couldn't find the answer.
I have an react native application, it has calling feature using .Net Core SignalR (For signalling) and webRTC for actual calling. There are three scenarios out of which my application works fine in two scenarios:
Application is in foreground: For this I simply inform other client that X is calling you (using signals from SignalR).
Application is in background: For this I send push notification to the client which is read by the application (notification listener) which in turns opens up the call accept/decline window.
I am struggling with scenario 3:
Application has been killed (from recent apps etc.) and is now not in background in this scenario I only receive the push notification but call windows doesn't open but if I open up that notification I can see the calling window as intended. I need a solution which will open up the calling window automatically just like it does in scenario 1 & 2. How can I listen to push notifications when the application is dead? So that I can show the call window?
I am looking for a solution that would preferably work both on Android and iOS and I am using FCM Push notifications. I am also open to solutions other than push notifications as long as they work correctly.
For supporting to android and iOS you can use
import messaging from "#react-native-firebase/messaging";
messaging().setBackgroundMessageHandler(async (remoteMessage) => {
// handle your notification message here
}

How to implement server side web push notification in my blazor app just like facebook type notification

I am using Syncfusin toast notification in my project.
But I want to implement server side notification in my application just like Facebook notification.
I want To my application notified when any entry occurred in my Azur SQL database table .
I want to send multiple user notification and single user notification .
Please help me how can I achieved this.
Blazor server side
Database Azur SQL server

Sending Push Notifications to Mobile app's and also to Web Application built in .Net Mvc

I am working on a MVC-4 C# web Application. The Application is connected with two mobile apps built in Ionic framework.
Currently i am in need to send push Notification's from my web application to mobile app's and also i want to show notifications on web app if any change happens in database.
I am using SQL Server 2008 as database.
I have searched alo't about this and found Signal-R and SQL Dependency as one option to monitor database and send notification to web application,but Signal-R cant send notifications to mobile app's.
I am looking for something that i can use for both purpose.
I heard a bit about Firebug ,if it could serve my purpose kindly guide me a bit about that..
Any Suggestion Regarding this would be highly appreciated.
if you want to push notification in android then used 'FCM' to push Notification.
please find follow link to push notification. Hope it will be useful for you.
Click Here

Gcm with appodeal

I am using gcm with appodeal in my app and when I am sending the push notification the for the first push was successful but phone is not receiving the notification and after that error is there while sending push that device is not register. What to do in this situation please help me.
Is it iOS or Android ? I had the exact same issue just yesterday with iOS and all I had to was to create a development provisioning profile and set it up properly in xCode. I hope that helps you.
I think for you to verify that your app can send and receive messages, client apps must register with GCM.
To register with GCM:
1.The client app obtains a registration token using the Instance ID API. The call to this API must have the authorized entity set to your app server's sender ID, and the scope set to the appropriate value for GCM (depending on your platform). Refer to the API reference for full detail on this API.
2.The client app passes the registration token to the app server.
3. The app server saves the registration token and acknowledges to the client app that the process completed successfully.
This thread may also provide further insight as to why you are receiving the device not registered error.

Can't receive toast notification in windows phone 8

I'm having problems receiving toast notifications for a Windows Phone 8 application. I did all the steps required:
For the client side, I did this:
Get the channelUri from MPNS
Open the channel
Bind to toast notifications
For the server side, I did this:
Server is written in PHP using this code
Hard-coded the Channel Uri I got in the client app into the PHP code (for testing purposes)
However, when I send the notification from the server, the phone doesn't seem to receive it. Everything runs correctly on the server side and the curl library loads without problems.
I got this!
The problem was in my constructor of the channel. I was doing this to create a new channel:
httpChannel = new HttpNotificationChannel("MyChannel","www.foobar.com");
This constructor should only be called in case of "Authenticated Mode" of push notifications, which requires registering your website and having a certificate.
Obviously, this wasn't my case as I was just testing the push system.
The solution was to create the channel using this:
httpChannel = new HttpNotificationChannel("MyChannel");
It's so misleading as the the official documentation of Windows Phone didn't mention this.