How can make Socket.IO works on android client side
I wrote this code in build.gradle
implementation('io.socket:socket.io-client:2.1.0') {
exclude group: 'org.json', module: 'json'
}
and here's my code in fragment, this code not work for me, how can I resolve it
val opts = IO.Options()
opts.forceNew = true
opts.reconnection = false
val mSocket = IO.socket(SOCKET_URL, opts).connect()
mSocket?.connect()
mSocket?.emit("join", Gson().toJson(data))
mSocket?.on("newuser", newUser)