turms icon indicating copy to clipboard operation
turms copied to clipboard

请教一下Java如何调用Kotlin客户端的suspend函数?

Open TyCoding opened this issue 1 year ago • 3 comments

看到项目中只有基于Kotlin的Client,但Java中貌似不能直接调用 Kotlin 的 suspend 函数

TyCoding avatar Jul 25 '23 09:07 TyCoding

We have no plan to support Java to use turms-client-kotlin for two reasons:

  1. Java is a really terrible language to write UI components, and Java on Android is fragmentary and has terrible support for async programming.
  2. Kotlin (just like Dart, and Swift) is the modern language for most UI-based applications.

So the suggestion here is: Please use Kotlin for your new applications.

JamesChenX avatar Jul 25 '23 11:07 JamesChenX

谢谢您的回答,但实际中我们的Java系统确实需要连接IM Server端接收或者推送消息,请问您一下,有比较优雅的写法吗?还是说我的Java系统必须重新实现一遍ImClient?

TyCoding avatar Jul 26 '23 03:07 TyCoding

If you have to use Java for your client application, I can add a Java client SDK for you. So what platforms do you need to support? (Android, Desktop, etc), and if you need to support Android, I will set the min supported Android SDK to 24 (Android 7.0) because it supports CompletableFuture without introducing other libs.

And I will try to deliver the SDK next month when I am available, but I am extremely busy recently, so I cannot make a promise.

JamesChenX avatar Jul 26 '23 12:07 JamesChenX