Building chat application with Laravel and Mobile clients (iOS and Android)

Viewed 2298

We are building a full chat system with Laravel (Back-end) and mobile applications (iOS and Android). It is a completely one to one chat system.

  1. Chat can be between mobile to mobile client
  2. Chat can be between a mobile client and admin on the web panel (laravel)
  3. We want all the data on our server so that admin can access the data anytime. For example, admin should be able to see the chat/conversation between two users.
  4. System will support text messages, sending files/images, share location etc.

We have looked for some options like Pusher but it gets a bit too expensive when you have a lot of users.

What would you guys suggest? I would love your advice.

Thank you.

1 Answers

You have 2 options here:

Implement by yourself

In your case you need the following:

  • Install some XMPP server in your cloud. It could be something like Ejabberd, Prosody, Tigase, Openfire
  • On client side - use XMPP libs to connect to XMPP server and to send/receive messages. For iOS it's XMPPFramework, for Android - Smack
  • On Web/Web panel - use StropheJS
  • for any service tasks - there are also XMPP libs for PHP

Use some messaging SaaS platforms

Except Pusher, there are also lot's of diff messaging platforms e.g Twillio, Layer, ConnectyCube, Applozic etc.

I used ConnectyCube some time ago, they support Messaging, Video Calling and Push Notifications functionality for iOS, Android and Web. They also have some ready code samples available, so can some some time on start. Pricing is a competitive one. So it can be done in the following way:

Hope it will be helpful for you

Related