websockets stuff
This commit is contained in:
parent
be4df87c99
commit
8c50b26b71
@ -177,11 +177,11 @@ fun DisplayMainPage(
|
|||||||
SocketHandler.processMessage("test", MainActivity().uniqueID)
|
SocketHandler.processMessage("test", MainActivity().uniqueID)
|
||||||
|
|
||||||
thread {
|
thread {
|
||||||
//val requestOutput = getTextFromAudio(audioRecorder.getOutputFile())
|
val requestOutput = getTextFromAudio(audioRecorder.getOutputFile())
|
||||||
|
|
||||||
val temp = JSONObject()
|
/*val temp = JSONObject()
|
||||||
temp.put("data", "salut je suis bob")
|
temp.put("data", "salut je suis bob")
|
||||||
val requestOutput = temp.toString()
|
val requestOutput = temp.toString()*/
|
||||||
|
|
||||||
processing = false
|
processing = false
|
||||||
|
|
||||||
|
@ -37,11 +37,13 @@ object SocketHandler {
|
|||||||
val body = JSONObject()
|
val body = JSONObject()
|
||||||
body.put("data", message)
|
body.put("data", message)
|
||||||
body.put("uuid", uuid)
|
body.put("uuid", uuid)
|
||||||
getSocket().emit("process_message", body)
|
getSocket().emit("process_message", body.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Synchronized
|
@Synchronized
|
||||||
fun joinRoom(uuid: String) {
|
fun joinRoom(uuid: String) {
|
||||||
getSocket().emit("join", uuid)
|
val body = JSONObject()
|
||||||
|
body.put("uuid", uuid)
|
||||||
|
getSocket().emit("join", body.toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user