Ershad Raoufi
Ershad Raoufi

Reputation: 55

make push notification service with signalr

Hi can I make push notification service with signalR? for example when user start the app,app can recive message and if app closed again app can recive messgae from servers or clients

Upvotes: 1

Views: 910

Answers (2)

Frank M
Frank M

Reputation: 1439

If you want the ability to send messages or have messages available to any client then store them in a database table. When they are connected, you can send those messages to them. When they are disconnected they would stay in the database.

You can control flagging messages as read after they are delivered and then deleting them from the database.

Your "push notification" is just querying for the messages when a client is connected.

Upvotes: 1

AminRostami
AminRostami

Reputation: 2772

Until you can send the message to clients that user is online.

And with the closure of the app, Disconnect Communication server with the client. And the ability to send any message disappears.

If you want to send notification after app closed, It is better to use the google service. (e.g: Firebase Cloud Messaging (FCM) services), Otherwise you can only use signalR for send message in your app.

I hope this is useful description.

Upvotes: 1

Related Questions