Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chat application using socket.io

I want to make chat application using socket.IO. I have a number of group user list(users in groups) that comes from server while parsing. but now i am going to chat against all these users. Means when i send message, all the group users received message.

But first thing i found the library. with example but in the example no clear UI just API classes in https://github.com/Gottox/socket.io-java-client that not clear to me. From above API I copied classes examples/chat/Chat.java, ChatCallback.java, ChatCallbackAdapter.java also import socket.jar from google not from above ApI, because in the above API it tell us to copy scr/io/socket, Its same things. if i am not right. "socket.jar and scr/io/socket"

Now i have totally four classes above three and one is layout class, I named it MainActivity.java And now i want that typyes of UI messaging. like in below screen shot.

Please anyone help me use this API and also above classes and implement proper messaging like in below image showing. i have my own server URL i will replace it later but now help me in code form that how to use these API classes with layout class.

Thanks

enter image description here

like image 415
user3283148 Avatar asked Nov 11 '22 06:11

user3283148


1 Answers

Using Socket.io is good start, but it's gonna be a lots of work to build a comprehensive chat app. If you want to skip the pain building everything from scratch, you can refer to Hyphenate SDKs (iOS, Android, and Web), which is real time communication with proprietary protocol over socket.

Hyphenate supports both Mobile and Web SDK with rich features and very reliable services. It also provides open source UI components so you don't need to build everything from scratch.

https://docs.hyphenate.io

https://github.com/HyphenateInc

like image 179
Jerry Avatar answered Nov 15 '22 07:11

Jerry