i want to create custom listener for listen web service response.
take a example
i send msg to server.-- immediately return msg(transaction accepted). after some time(might be 1 miniute) server send another msg (your transaction done)
how to listen last response.
That’s the job of a socket…
if u have any code please share because i am new person in ionic 2
Well… The easiest way is to use 3rd party service… like pusher websocket service… once your process done at the back, publish a message to be listened at the front…
An option would be to use Server Side Events and use EventSource as a client.
Open the stream from the client. You can send the server stuff via regular ajax calls. And then the server can react at any moment in time, when the connection is open…
https://www.sitepoint.com/real-time-apps-websockets-server-sent-events/ is a nice tutorial on it.
Im facing this problems… i dont know how i can create a listener for manage changes into a Api Json.
I need to use firebase? Sockets?
Damn i’m lost and i dont know if anyone achieve this on Ionic. It’s annoying
Do you have any example of this?