ws-poker-planning-kmm
Introduction: Kotlin Multiplatform Mobile (KMM) PokerPlanning client app
Tags:
Kotlin Multiplatform Mobile (KMM) PokerPlanning client app using web sockets through ktor
Show cases
| Android app | iOS Application |
|---|---|
| YouTube recording :cinema: KMM demo Android | YouTube recording :cinema: KMM demo iOS |
![]() |
![]() |
What's included in this proof of concept
This POC shows usage of the following kotlin multiplatform libraries:
ktor-client-corefor doing classic HTTP communicationsktor-client-websocketsfor web socket full duplex communications supportkotlinx-coroutines-corefor asynchronous method and multi-threadingkotlinx-serialization-jsonallows objects annotations to support JSON serializationkotlinx-datetimeto handle ISO-8601 datetime format
shared module includes
- classic KMM
ExampleServiceto showexpect/actualplatform implementations (Android, iOS) - the
ExampleServicealso includes a classic HTTP communication throughktor - poker planning business models (enum, interfaces, classes)
PokerPlanningServicebusiness logic implementationWebSocketServiceas aktorwrapper to handle web socket messaging exchange
androidApp module includes
MainViewModel.ktexample showing two ways binding (between the UI and thesharedmodule)androidx.composeusage example (for the two way binding mechanism)MutableSharedFlowis used to model web socket incoming message as they are received by theWebSocketServiceFlowis used to model HTTP call result received byExampleService
iosApp module includes
ContentView.swiftexample showing two ways binding (between the UI and thesharedmodule)


