How to create a messenger app??

4 views
Skip to first unread message

suyash...@shephertz.co.in

unread,
Sep 12, 2013, 6:35:09 AM9/12/13
to node-...@googlegroups.com
I want to create a messenger app, I want to know how I can create a background process, which will check for notifications. I want to show an icon in system tray. I also want to create notifications??? 

Anatoly Pashin

unread,
Sep 12, 2013, 10:04:15 AM9/12/13
to node-...@googlegroups.com, suyash...@shephertz.co.in
For "background process, which will check for notifications" you should use something like socket.io connection emmiting new messages from/to user. For icon see https://github.com/rogerwang/node-webkit/wiki/Tray

As far as I know notifications are not implemented for now due to they are in unstable state in crhomium upstream. But you can make annoying app focusing chat window on new message :)


четверг, 12 сентября 2013 г., 21:35:09 UTC+11 пользователь suyash...@shephertz.co.in написал:

Laszlo Z. Antal

unread,
Sep 12, 2013, 10:59:13 AM9/12/13
to node-...@googlegroups.com, node-...@googlegroups.com, suyash...@shephertz.co.in
Hi,

On Sep 12, 2013, at 7:04 AM, Anatoly Pashin <anatoly...@gmail.com> wrote:

For "background process, which will check for notifications" you should use something like socket.io connection emmiting new messages from/to user. For icon see https://github.com/rogerwang/node-webkit/wiki/Tray

As far as I know notifications are not implemented for now due to they are in unstable state in crhomium upstream. But you can make annoying app focusing chat window on new message :)


Good advice there. If your app is lightweight it might be better if you just use web workers instead an other library.
For notifications just create a new frameless window with a close X icon and show it at the top right corner of the window. I would add a timer to close it self after x seconds for good UX measures.

Laszlo


четверг, 12 сентября 2013 г., 21:35:09 UTC+11 пользователь suyash...@shephertz.co.in написал:
I want to create a messenger app, I want to know how I can create a background process, which will check for notifications. I want to show an icon in system tray. I also want to create notifications??? 

--
You received this message because you are subscribed to the Google Groups "node-webkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-webkit...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

suyash...@shephertz.co.in

unread,
Sep 13, 2013, 2:42:39 AM9/13/13
to node-...@googlegroups.com, suyash...@shephertz.co.in
Thanks guys for replies.

I want that, even if a user closes the window, the process will run in background, and when the user will click the tray icon, the window will appear. 
How to run a process on startup of program, instead of creating a window. Through that process I will create windows.

Laszlo Z. Antal

unread,
Sep 13, 2013, 3:06:34 AM9/13/13
to node-...@googlegroups.com, node-...@googlegroups.com, suyash...@shephertz.co.in
Hi

On Sep 12, 2013, at 11:42 PM, suyash...@shephertz.co.in wrote:

Thanks guys for replies.

I want that, even if a user closes the window, the process will run in background, and when the user will click the tray icon, the window will appear. 
How to run a process on startup of program, instead of creating a window. Through that process I will create windows.


After you start your app just hide the current window. Not front of my computer but it looks something like this.
var gui = require("nw.gui");
var win = gui.Window.get();
win.show(false);
That will hide the current window and you can show it again by calling win.show() when needed.
Wiki page has examples for tray icon.

Laszlo


On Thursday, September 12, 2013 4:05:09 PM UTC+5:30, suyash...@shephertz.co.in wrote:
I want to create a messenger app, I want to know how I can create a background process, which will check for notifications. I want to show an icon in system tray. I also want to create notifications??? 

--

suyash...@shephertz.co.in

unread,
Sep 13, 2013, 3:08:26 AM9/13/13
to node-...@googlegroups.com, suyash...@shephertz.co.in
Thanks!!! :) This is what I was looking for
Reply all
Reply to author
Forward
0 new messages