Which is the best Android API to develop a talk application?
To implement instant messaging on a mobile app there are two major approaches that you could take. Using a hosted backend as a service or using XMPP.
Backend as a service / Messaging as a service
There are a large number of companies suggesting real-time back finishes and hosted messaging as a service. I’ll go through the main offerings and provide some strengths and weaknesses.
Firebase is Google’s real-time database service. It’s relatively unique among the other services in that it permits you to store data in the cloud and get real-time updates when that data switches. Coupled with the fact that Firebase also suggest thrust notification, file storage, hosting and a user authentication layer; this means that you can build a fully functional app just with Firebase alone. Firebase is very well suited to instant messaging. This is likely because Firebase was a spinoff from the founders previous web messaging startup.
There’s also a fully featured open source messaging library that’s build on top of Firebase. It includes numerous message types; private, group and public talks; user profiles etc.. The project is available on Github – Firebase Talk SDK for Android .
I group these services together because they are fairly similar. They permit you to stream data from device to device in numerous configurations: 1-to-1, 1-to-many, many-to-many. This makes it possible to channel messages inbetween devices. The difference inbetween these services and Firebase is that they don’t provide the data storage or any authentication infrastructure. This means that you would need an existing application server to use their service.
Layer suggest a service to stream messages inbetween devices. Think of it as a version of Pusher or PubNub that is specifically designed for messaging. They permit you to add attachments to messages and provide some basic functionality to block users. Layer doesn’t provide any authentication so you would need your own app server.
I’ve also heard some anecdotal reports that their pricing plan gets expensive very quickly so check that out cautiously before going with them. You should also read their terms and conditions cautiously because it looks like they retain the right to sell your users’ data to third parties.
XMPP is the industry standard framework since it was created in the late 90s. It powers a large number of corporate talk systems as well as popular apps like Skype, WhatsApp and Facebook Messenger. The three most popular open source XMPP servers are:
There are a number of open source XMPP clients for Android but most of them have licenses that aren’t commercially compatible. If you desired to build your own client I’d recommend using Smack .
XMPP is good because it offers a lot of advanced messaging features and because you could host the server yourself.
A question was added in the comment which I think needs a utter reply.
Is it possible to make Telegram or Kik like app on firebase without using any other backend systems…
The brief response is that 90% of the time yes and 10% of the time no. There are certain features that will require an application server. Two big ones would be: two factor authentication and encryption.
Firebase is fine when the data on the server is possessed by the user. For example, a thread belongs to the creator, a message belongs to the sender etc… However, there are cases where data belongs to the administrator – this could be an API secret or an encryption key. This is data that should never be collective with the client.
Messaging apps like Kik and Telegram have a phat number of features and the vast majority can be replicated using Firebase alone. However, if you wished to copy all the features, you may need a supporting app server.