-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port flutter features to KMP #301
Comments
How can I help? |
Hi @crc-32 Are you referring to Compose Multiple platform as KMP UI? |
yep! as has been done for the locker screen |
Have you considered generating JNI bindings to the native code so that you can avoid rewriting the app? You can find some examples here. This can automate some of the native API generation and decrease the friction between Dart and Swift/Kotlin/Java. Things like PebbleKit could potentially be exposed directly in Dart. |
Potentially, the support seems lacking at least according to that page (macOS is listed with no support on flutter and there's no mention of iOS), but there are also deeper issues to consider, Flutter has scared off prospective contributors before for various reasons and has the image of being in a kind of limbo of whether it'll be killed. |
For reference there is an iOS + Android sample app here: https://github.com/android/kotlin-multiplatform-samples/tree/main/Fruitties The sample app leverages Skie for Swift bindings: https://skie.touchlab.co/intro#getting-started Touchlab also has a KMP plugin for Xcode: https://touchlab.co/xcodekotlin |
What's your opinion on where the line should be drawn for Multiplatform vs Native Code? It seems the KMP samples usually stop at the ViewModel layer, perhaps since iOS Compose is still in beta? |
As can be seen in the already written code in the 'shared' module, native code should begin when you need to call a native API e.g. the platform's calendar API, permission request, bluetooth connection, since there's really no downside to using common code up until that point. |
should PR's for these tasks be made against the kmp branch? |
@coryellcp that would make sense yep! I just updated that branch so it's now in line with changes from master |
Hello, Android/KMP developer is already here! I'd like to try adding Bluetooth connectivity based on the great Kable library (my work on StackOverflow). Can I do this without having a Pebble watch? Unfortunately, I didn't get a watch in its golden era, and right now there are only 8 watches in the whole country on Avito (Russian equivalent of Ebay), at a considerable price and with unknown working capacity. I have esp32-c3 microcontrollers on hand, also I can order nRF52840 dev board. P.S. I STRONGLY do not recommend writing the Bluetooth stack in the app yourself, as it has always been extremely complex and unstable in Android, and in the latest SDK updates the situation has become even more ambiguous. Trust me, I've tried it. If we want to get working Bluetooth on all devices, we need to use Kable (or blue-falcon, which I like less) or we will be forced to implement ALL the developments from there (no useless code there, the amount of code in the library is due to the complex BT stack in Android). P.P.S. Let me know if I should communicate on this issue at libpebblecommon repo. |
I also would like to help |
There's a ton of features in Cobble that are implemented in flutter, we want to move to Kotlin Multiplatform, both in UI (Compose Multiplatform) and implementation, so it's more maintainable and we don't have to cross the 'gap' between flutter and the native code.
Alot of work has already been done on this to remove our reliance on a flutter background worker, but we still have the UI and any business logic still in flutter to do!
These should be gradually integrated, launching the associated screen in the KMP UI when selected from flutter (as the Locker tab currently does)
The text was updated successfully, but these errors were encountered: