Copy link to clipboard
Copied
I am wondering how can I create a chat function in my mobile app creating in AIR and Flex. The chat should be similar to the one in WhatsApp.
Do you know some possible solutions?
Thank you in advance!
Copy link to clipboard
Copied
To enable chat messages, you need a server. The kind of server depends on the application. Do you want to create a chat like application like WhatsApp, where the server pushes messages without an active connection? Or do you have some sort of online game, where chat messages can only be transferred when the client is connected already?
I have an online game where clients are connected to a Java server at all time. From there it is pretty straight forward:
2 textfields:
- 1 line textfield for input messages
- multi-line textfield for chat history. Make sure the textfields autoscrolls to the bottom when the content changes
on enter or button push, send a socket message to the server.
the server broadcasts all messages to all clients that are subscribers of the chat group.
Copy link to clipboard
Copied
I need an application where chat messages can only be transfered when the client is connected.
I would be grateful if you give me some examples of what servers should I use? Also if you can recommend me some resourses where I can read more about this topic.
As I have never made chat applications, and I really do not know where to start from.
Copy link to clipboard
Copied
Check out www.smartfoxserver.com, they have a powerful, easy to use online game server that is extendible with Java. You want the SFS2X version. The community edition for up to 100 players is free and it already comes with a chat protocol that is straight forward to implement. They have all sorts of documentation, tutorials and an ActionScript client library.