Reputation: 95
I am trying to create a forum based group chat application on android.I need to be able to draw and send voice messages over chat.
I am confused between IRC and XMPP for chat protocol to use.Can someone please suggest me in this regard.
I feel IRC is better for my application as it is mainly designed for group communication in discussion forums but i am not sure whether IRC supports anything else apart from text messages.
Upvotes: 3
Views: 1174
Reputation: 8785
You can send any kind of binary data (images, sound, etc) in plain text using codifications systems, like Base64 for example.
You must take care about chosen codification character domain does not collide with your protocol method to delimit messages. Other common issue is the size of the message protocol allows. Maybe you need implement some type of chunked message in the protocol and some MIME that describes the binary content.
Here you can find a list of common B2T encoding standards.
For draw in "real time", the simplest solution is send an snapshot image to clients with the current image being drawn in the drawer client. If you do it 10 times in a second you get an 10 frames per second animation of the drawing. To optimize that there is a technique called Delta encodig, sometimes called Delta compression. Is a way of storing or transmitting data in the form of differences between sequential data (in this case an image) rather than complete files. So, in the client, you recibe just the diferences betwen two "frames" and the only thing you need to do in client is "merge" the current "frame" with the difference to show the next "frame".
Upvotes: 2