How does Whatsapp keep its connection to the socket when the app is totally closed off.
Does Whatsapp use GCM or APNS push to trigger the App to sync with the Ejabberd?? Some people say it always stay connected(I am pretty new to this) but i tested i rebooted my phone, clear ram, AppManager forced close Whatsapp, it still receives the messages. So wondering can you make code runs on the OS level to keep the connections when everythings closed? Or it just use the GCM for triggers?
Isnt the only connection the phone has is the Android GCM when no app is running in the background?
I am very confused, if Whatsapp does use XMPP protocol, how does the App stays connected to the server when it is totally closed out?
I have researched further, found Pubnub is running something similar with TCP or XMPP protocol and can research messages while the app in the background.... But NOT IOS. http://www.pubnub.com/knowledge-base/discussion/381/can-my-ios-app-receive-messages-while-inactive
It requires the APNS push to wake the app up first then to reestablish the connection. But how about Whatsapp? Seems like Appstore compliance problem? But AppStore allow many apps to run in the background, but doesnt it allow Pubnub or Apps that have a connection to stay alive in the background?