rsocket / rsocket-kotlin

RSocket Kotlin multi-platform implementation
http://rsocket.io
Apache License 2.0
550 stars 37 forks source link

Provide a working rsocket-kotlin and Android example #164

Open yschimke opened 3 years ago

yschimke commented 3 years ago

Out of https://stackoverflow.com/questions/67837839/is-it-possible-to-use-rsocket-in-android-with-kotlin

We should provide a working example android test, similar to https://github.com/square/okhttp/tree/master/android-test

clayly commented 3 years ago

Can i help somehow with such example? Is it suitable for Android in any way?

yschimke commented 3 years ago

What are you thinking? Add a test that runs in CI as described above?

Alternatively a relatively clean sample that hit demo.rsocket.io would be a good starting point.

clayly commented 3 years ago

What are you thinking? Add a test that runs in CI as described above?

Alternatively a relatively clean sample that hit demo.rsocket.io would be a good starting point.

I am working on it, diving into the project. Is there something special about contributing what i should know?

yschimke commented 3 years ago

No, put up something for discussion and it should flush out any concerns. Thanks!

If there is anything we are missing we should clarify it in the docs.

LittleTrickster commented 3 years ago

I did create a demo https://github.com/LittleTrickster/AndroidRSocketDemo (it's a little bloated for a demo) that works both as a server and a client but there is still https://github.com/rsocket/rsocket-kotlin/issues/148 issue that crashes the whole app when the client loses connection to the server. Used unsafe workaround with Thread.setDefaultUncaughtExceptionHandler to prevent the crash for now.

clayly commented 3 years ago

I did create a demo https://github.com/LittleTrickster/AndroidRSocketDemo (it's a little bloated for a demo) that works both as a server and a client but there is still #148 issue that crashes the whole app when the client loses connection to the server. Used unsafe workaround with Thread.setDefaultUncaughtExceptionHandler to prevent the crash for now.

Have you tried to make it work with okHttp?

LittleTrickster commented 3 years ago

I did create a demo https://github.com/LittleTrickster/AndroidRSocketDemo (it's a little bloated for a demo) that works both as a server and a client but there is still #148 issue that crashes the whole app when the client loses connection to the server. Used unsafe workaround with Thread.setDefaultUncaughtExceptionHandler to prevent the crash for now.

Have you tried to make it work with okHttp?

Yeah it works just add android:usesCleartextTraffic="true" to manifest.

androiddevcoding commented 1 year ago

@LittleTrickster Is the sample project up to date?

LittleTrickster commented 1 year ago

@nailshakurov It's not.