Issue
I am working on a chatting app. In which one user sends message to another user. So there are two users(user1 and user2). when user1 sends a message to user2. On back-end I am sending the message to my web-server using post method, then user2 is always sending get request to server and receives the message in response. In this way my job is done but my question is that if there is any way to send a request from web-server to phone? and user2 can directly receive the message without sending request to the server all the time. Please help!
Solution
As @Linesh said above, could be one possible solution but rather unconventional using GCM for chatting purpose; instead you can make use of standard web sockets, which could be easily implemented in node.js, or PHP,Python, whatever server side programming you are supposed to be using. also based on websockets , have look at socket.io or you can make use of some third party chatting API's like quickblox, or pub-nub or even AWS as well.
Answered By - U.Swap Answer Checked By - Pedro (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.