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

时间:2018-12-26 20:45:09

标签: android ios laravel chat pusher

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 个答案:

答案 0 :(得分:1)

您在这里有2个选择:

自己实施

在您的情况下,您需要以下内容:

  • 在您的云中安装一些XMPP服务器。可能类似于EjabberdProsodyTigaseOpenfire
  • 在客户端-使用XMPP库连接到XMPP服务器并发送/接收消息。对于iOS,XMPPFramework,对于Android-Smack
  • 在Web / Web面板上-使用StropheJS
  • 用于任何服务任务-还有适用于PHP的XMPP库

使用某些消息传递SaaS平台

除Pusher之外,还有许多差异消息平台,例如Twillio,Layer,ConnectyCube,Applozic等。

我前一段时间使用ConnectyCube,它们支持针对iOS,Android和Web的消息传递,视频呼叫和推送通知功能。他们还提供了一些现成的代码示例,因此可能需要一些时间才能启动。 Pricing是有竞争力的。因此可以通过以下方式完成:

希望对您有帮助