How to join the room with Socket.IO (Android)

Asked 1 years ago, Updated 1 years ago, 94 views

I use the Android version of native Socket.IO to create a program using Socket.IO.
Note: http://socket.io/blog/native-socket-io-and-android/

Environment:
Android Target Version: android-19
Eclipse Luna Service Release 2 (4.4.2)

I'm looking for a method to enter room, but I can't find it.

private Socket mSocket;
{
    try{
        mSocket=IO.socket("http://[Socket.io]/");
    } catch(URISyntaxExceptione){}
}

protected void onCreate (Bundle savedInstanceState) {
mSocket.connect();
mSocket.emit("from_client", "Android"");
    ・・・     
}

I succeeded in sending the message.Is there any way to enter the room in the Android version of Socket.IO?
Please let me know if you know.

android eclipse socket.io

2022-09-30 20:57

1 Answers

I think you can enter the room just by adding the Room name after the URL.

"http:// [Socket.io server]/[Room name]


2022-09-30 20:57

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.