Closed demym closed 6 years ago
@demym can you please share you code if possible. I am using socket.io with nativescript 2.3.0 and not able to configured it
Hi @demym ,
Can you please tell me how to integrate nativescript with socket io ,i'm trying to implement chat app with nativescript-chatview ,if you could help that would be so obliged.thanks in advance and wish you a happy new year
I would recommend to create an Angular service to handle all socket connection with the server and then broadcast all data through your components/services by using rxjs Observables. The good thing is that Angular uses it and it's one more node_module that comes by default in all nativescript apps so you don't have to install anything, just use it.
You can check the angular demo for and example
Hi,
i have successfully implemented nativescript + socket.io chat.
Problem is that my app has several pages (and one of them is the chat interface). How can i catch socket.io events in any page, and then propagate this event to the other pages ? Typically, i would like that if a user receives a chat msg while he is not on the chat page, that msg would be dispatched to the chat page (or at least have some notification about it).
Thanks very much in advance. I am using plain JS and NativeScript