-1

I want to implement an instant messagign service analogously to whatsapp. The messages are delivered, even thoug sender and receiver do not need to be online at the same time.

Is there a framework existing to do so (btw I use a linux server). Is the Google Clouse Service suitable for this? Thank you

softwaresupply
  • 1,908
  • 3
  • 20
  • 34
  • xmpp server. (Prosody?) Google Cloud Messaging works great, but its designed for android OS. – zipzit Mar 20 '15 at 07:59
  • Actually the app is only on Android. Is the cloud messaging service still suitable for handling chat messages, also with file attachments and deliver them when the receiver comes online? – softwaresupply Mar 20 '15 at 08:07

4 Answers4

1

You can try openfire. It has offline message and everything. Server can be hosted in linux as well.

Sabbir Sadik
  • 36
  • 1
  • 2
  • Sounds great as well. Is there an API and an easy way to implement a client to communicate with the server? – softwaresupply Mar 24 '15 at 06:21
  • 1
    Sure.. you can find a list of clients supported by openfire [here](http://www.igniterealtime.org/downloads/index.jsp). A simple android client can also be implemeted using [Asmack](https://github.com/Flowdalic/asmack). For implementation, [this](http://developer.samsung.com/technical-doc/view.do?v=T000000119) may help you. – Sabbir Sadik Mar 24 '15 at 08:46
1

Google Cloud Messaging (GCM) is a service that manages small messages to / from android. It does require users to be using google play.

What makes it so cool is they will manage the connections for you. They will queue stuff up for a period of up to four weeks, and after that will send a message telling you that its been more than weeks, and you will need to process a new request to obtain the original messages again.

Its a free service. There are some rate limits, but they seem pretty reasonable. i.e. You can't use it for sending frequent game moves, but its totally fine for normal text messages. As I understand it, GCM is only a server interface. You will have to roll your own XMPP server to store and manage messages. Note: there is a payload limit on GCM messages, I think its 4k or so... not big enough for images. You'd have to manage those via http, and send image names via GCM.

They will also broadcast messages to users (1000 at a time). Did I mention this is a free service?

Something like this link will get you started. The API keys thing and registration #'s is sorta confusing. Once you figure that out, it all works. You can test to your emulator via curl messages to the google server, etc..

Oh, and GCM also keeps track of all your user analytics as well..

zipzit
  • 3,778
  • 4
  • 35
  • 63
  • This sounds very promising! As well Do you have an idea how to deliver attachments? – softwaresupply Mar 20 '15 at 08:49
  • Sorry, Dunno, yet. Still working on that stuff. I'm still a few days away from understand best practices on that one. I do believe HTTP is the right answer. Here's a clue...https://www.ejabberd.im/node/21491 – zipzit Mar 20 '15 at 08:59
0

There is Layer (Android and iOS support for the moment)

Raed
  • 519
  • 1
  • 6
  • 23
0

Hey Checkout this easy way to implement chat Quickblox Api

Anshul M
  • 1
  • 2
  • Is this also suitable for offline message delivery (messages need to be delivered when user comes online)? Is it possible to use pushmails to deliver the messages here? – softwaresupply Mar 20 '15 at 08:02
  • As I see not free as well - the probelm is - if it is succcessfully once it will be expensive... – softwaresupply Mar 20 '15 at 12:59