Reputation: 2730
I have a voip app, and a customer would like to still be available after closing the app. Can I do something to make my app work like facetime?
The app has to login on our signaling server. The server relays messages like "start a call" to the clients.
So if A wants to call B, A has to open a socket and send the login signal (same for B) and then send a "call_create" signal to the server with a parameter "user" set to "B". The server then looks at the message, sees that it is meant for B and sends it to B (if B is logged in as well). B now receives the message that A wants to start a call and can send an "accept" back to the server. The server sends this message back to A and the call gets started.
Now, when the app is closed (double tap home button, swipe up), obviously the socket is killed as well. But one of our customers wants to still receive calls after killing the app (long story, but there is no other way).
I know facetime does not have to run to be able to receive calls, but I'm not sure if this is possible with a regular app (facetime is part of the OS). Ideally I would move the logging in part to the settings menu, just like facetime, and then have a connection with the signaling server all the time, regardless of the app running or not.
Upvotes: 0
Views: 562
Reputation: 38181
looks like you need utilize push notification feature. In case your product supports also android see Google Cloud Messages.
Upvotes: 1