Reputation: 2604
hi this is just for knowledge. i will try to explain as much as i can what is my question. Usually i call on an Async Service every amount of time i.e updates on the server part for example are not reflected as soon as they change. whatsapp for example reflects the updates almost instantly. for example when a user is typing, it shows to the other user that he is typing. In short what protocols do they use and how do they use it.
thank you.
Upvotes: 4
Views: 460
Reputation: 2325
What protocols do they use?
Application like Whats app,G-talk ,facebook etc they uses XMPP protocol for IM services.
What is XMPP?
The Extensible Messaging and Presence Protocol (XMPP) is an open technology for real-time communication, using the Extensible Markup Language (XML) as the base format for exchanging information. In essence, XMPP provides a way to send small pieces of XML from one entity to another in close to real time
As per latest version of specifications XMPP provides below services
- Channel encryption [RFC3920]
- Authentication [RFC3920]
- Presence [RFC3921]
- Contact lists [RFC3921]
- One-to-one messaging [RFC3920]
- Multi-party messaging [XEP-0045]
- Notifications [XEP-0060]
- Service discovery [XEP-0030]
- Capabilities advertisement [XEP-0115]
- Structured data forms [XEP-0004]
- Workflow management [XEP-0050]
- Peer-to-peer media sessions [XEP-0166]
This are the core services available in XMPP
Below are some Applications where XMPP can be used
- Instant messaging
- Groupchat
- Gaming
- Systems control
- Geolocation
- Middleware and cloud computing
- Data syndication
- Voice over IP (VoIP)
- Identity services
Like HTTP XMPP also require server-client implementation
Below are some popular XMPP servers
- Ejabberd
- Openfire
- Prosody
- Tigase
You can find more information on xmpp server on this link
Different platform has their different XMPP client library you can more information on this link
If you want to implement XMPP client for android then you can use Smack 4.1 ,it is an open source XMPP client library written in java.
I have tried to list down basic feature of XMPP here but if you getting started with xmpp ,then there are lost of things to learn , free to ask any doubt regarding XMPP I will try my best .
Thank you
Note:: for the user who are still using aSmack should Upgrade to Smack 4.1 as aSmack has been deprecated!!
Upvotes: 1
Reputation: 188
You could implement the Google Cloud Messaging (GCM) service, as the GCM site says:
Google Cloud Messaging (GCM) for Android is a service that allows you to send data from your server to your users' Android-powered device, and also to receive messages from devices on the same connection...
This way you can inform from one client a status change, the backend then send the propper message to the desired clients and finally those clients app updates the status.
https://developer.android.com/google/gcm/index.html
Upvotes: 1