Receive Push Notification with Node.js webToolkit - node.js

I'm developing a desktop application using Node-Webkit.
Now I need to receive push notifications from somewhere.
This is what happens:
1) An android application sends a message to my WebApi server
2) My WebApi server receives that message and forwards it to the Node-Webkit desktop application
The desktop application can't poll the server, so I need a callback that "wakes up"
the desktop application to show the message on the screen.
So I need a service that can send push notifications to an Node-Webkit client.
Is there a way to do it?
Thanks a lot!

You should be able to achieve this by using socket.io
http://socket.io/

Related

Flutter push notifications using Socket IO and NodeJS Backend, is it Possible?

I'm planning to develop a native app for an already-built web app and nodeJS server that uses socket IO for real-time updates, my concern is if I can generate push notifications using socket io even when the user is away from the app?
If you want something simple, i will advice you to use firebase.
But if you still want to use socket.io, you can do it. The app listen for event emitting and when receive the event, trigger a local notification.
Check this link to learn more about background process.

How could i send notfication app to web in node js i am new to nodejs please if you can

i have to send a notification on web when a event occurs on app
Assuming you are using ReactJS, you need to use WebSockets. Check this tutorial on how to achieve that.
If the event dispatches from server, you can use Socket.IO, but if there is no hurry in getting notifications you can request in AJAX form every (for example) 5 minutes from client side code, to check if there are any notifs or not.

What module / service should I use to push message from Node.js server to Mobile App written in Unity?

Here is my set up:
Node.js server with RedisCloud, and client mobile app written in Unity C#.
I'm trying to push message from Node.js server to UnityC#.
At first, I try to get Unity access RedisDB directly but that is too dangerous having Client connecting to DB, and open the port.
So, what module works well between Node.js & Unity for message pub/sub? or 3rd party services that takes data from Redis, and push to Client?
I think socket.io will work but it seems just too much work for Client to write code handling that.
Is there something like Firebase or Photon, but instead using Firebase DB, point to my own RedisDB?
Thanks.
If your mobile client is for iOS then you should use "Apple Push Notifications", if Android, you should use "Google Cloud Messaging".
You can easily find modules for these tasks on npm, for example: https://www.npmjs.com/package/gcm
Use a Cloud service like Pusher or Realtime (the company I work for). Simply subscribe a channel on your mobile app using the Realtime Unity SDK and publish the messages from your server using the Node.js SDK. You don't need to worry about the dirty backend details (security, scalability,...)
More at http://framework.realtime.co/messaging

How to send push notification using XMPP Server?

I want to develop a chat application in iphone. I'm using ejabberd xmpp server. Now i'm able to send message to other user.
Now i want to receive the message with push notification.
I heard that we can use xmpp servers to send push notifications.
So Can anyone tell me, I want to know how
Is it possible to send push notification with ejabberd
Is it possible send push notifications from ejabberd xmpp server using node js.
Please give any suggestion to start using notifications for messages in xmpp.
If you want to send push notifications with ejabberd community edition, you need to add an ejabberd module, which sends the offline messages to a specified push notification provider. This provider send the notifications to apple APNS or googles GCM.
You could develop a module by self or maybe you will find some in inet. mod_zeropush (https://github.com/ZeroPush/mod_zeropush) would be one of them, but the zeropush service by self is canceled. Another one would be mod_onesignal (https://github.com/nobreak/mod_onesignal). OneSignal is a free to use Push Notification provider.
XMPP requires a persistent socket connection or a "persistent" BOSH connection during your whole XMPP session. Whenever your iOS app goes in background iOS kills your socket connection, and your Openfire server kills your XMPP session. This means the user goes offline. Which is also the reason why incoming messages for this user go to the offline storage.
A more straight forward approach is to do something in openfire, when openfire can't deliver a message it stores it in offline table, we can do some interception on that part and initiate the push process with the message.

server send push notification to client browser without using polling

I am developing a web app in which I want that when some changes in database occurs, server sends response to particular client(like push notification). And I want this notification to be sent client's browser. I don't want to use polling.
What can I do?
I think it's possible using SSE, but I am not clear.
I want to know
Is it possible to send response to particular client without client's request(without polling).
How server will detect that particular client?
please help me.
There is Web Notification. And there you can see the browsers that support it.

Resources