8

I am developing a REST api for my android app using laravel.I want to implement web to mobile chat like Facebook's messenger.Any suggestions?

Comments
  • 4
    Perhaps a web socket?
  • 6
    I suggest you to implement a new facebook
  • 3
    I would use websocket, as @alexbrooklyn said, and Firebase for receiving notifications on mobile when app is not active.
  • 1
    @CoffeeAndHate I found an article about socket.io Redis and laravel but it wasn't clear enough. Can you explain more the utility of firebase in this scenario?
  • 1
    You will need Firebase if you want your users to receive notifications after they close the app.
    You won't be able to keep the websocket or any socket connection opened indefinitely because Android will eventually terminate it once the app closes.

    Firebase sends notifications through Google Play Services, which is a process that is always connected to their servers.
  • 1
    @CoffeeAndHate I understood. Now concerning real-time chat .I found tutorials about creating a chat platform between mobile devices .However I want to build a chat platform between a web user and mobile user .Did you ever work on this kind of project if so a good advice might help me a lot
  • 1
  • 2
    @xPanther It would be more easy if you have specific questions, as I am not good at giving advices.

    I would mention that php is a bad choice for the actual chat server. Choose something else, something that supports multithreading - which is pretty much anything other than php.

    You can continue using laravel for what you are building, but not the chat server.
  • 4
    Switch your stack. Use nodejs with express and socket.io as backend and something js based for the front end like angular. You need socket.io in the frontend too.
  • 2
    @xPanther it run on the same backend server, the platform doesn’t matter, both mobile and web read from same database
  • 1
    @devTea What are you using for back end server dev?
  • 1
    use rocket chat
  • 1
    @Charon92 Can I DM here on devRant .I'm new to this app
Add Comment