Hey Everyone. This is Zeeshan Syed. I'm an Andro...
# multiplatform
z
Hey Everyone. This is Zeeshan Syed. I'm an Android App Developer working with Genfare SPX. We have a requirement to unify the Point of Sale features. Our goal is to club a web, Windows application and Android app (each one has many similar functionality). These 3 platforms' main functionality is to read and write smart cards using a USB card encoder (we have more devices like a customer pole display, credit card swiping machine, etc). Since we have 3 different platforms to handle individually, we had to do a lot of effort making changes in each platform. That's why we want to build a unified Kotlin Multi-platform project. I have no clear way of planning and I don't know whether it is possible to do or not. Because, each platform (Windows and Android) heavily depends on platform specific code as we have to access peripheral devices connected to USB. If you have any suggestions on how to achieve this or if you want more info, please ask. Your suggestions will help us tremendously.
m
For Windows and Android you can write a JVM app and abstract the API/library that grants access to USB devices, with one implementation for Android and another for other platforms. For instance you can use a Java USB library to implement it on Windows (there are several). You can then use Conveyor to ship an app that will start automatically at boot/login, and now you have a kiosk-like experience with auto-update. You can use Compose [for Desktop] to share the UI code between the two platforms if you wish (desktop/android), there are KMP examples from JetBrains showing how to structure such a project. You could then experiment with using Compose on the web too via Kotlin/JS, but that's more experimental. If you have a good desktop app and Android app you may not need a web version at all?