Skip to content

A multiplatform client for the popular Omegle chatroom

License

Notifications You must be signed in to change notification settings

lppedd/komeglem

Repository files navigation

komeglem

komeglem is an attempt to a multiplatform client for the popular Omegle chatroom.
The project is developed just for fun, and to try out Kotlin Multiplatform capabilities.


An example of how to start chatting with a random stranger:

val listener = object : OmegleRandomChatListener {
  override suspend fun onWaiting(chat: OmegleRandomChat) {
    println("Waiting")
  }

  override suspend fun onConnected(chat: OmegleRandomChat) {
    println("Connected: ${chat.getClientId()}")
  }

  override suspend fun onDisconnected(chat: OmegleRandomChat) {
    println("Disconnected")
  }

  override suspend fun onMessage(chat: OmegleRandomChat, message: String) {
    println("Message: $message")
  }
}

val omegle = omegle(/* Optional custom OmegleApiFactory */)
val session = omegle.newRandomChat(listener, language = "en")

// At some point you may want to forcefully disconnect the chat session
session.disconnect()

// Remember to dispose the Omegle instance when not needed anymore
omegle.dispose()

About

A multiplatform client for the popular Omegle chatroom

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages