|
|
|
|
|
by smackeyacky
1730 days ago
|
|
Has anybody switched to mixing in Kotlin code within an existing Java Android app? I'm not a huge fan of Java but I don't know whether it will be too jarring for maintenance tasks if I have both languages as code. There is a lot of XML floating around in my app (as most Android apps have) but switching between editing that and the Java is fine. I'm keen on the idea that there would be less code and my app is getting a little creaky and could use a refresh, but does Kotlin make the boring stuff easier? Things like inflating classes from REST json calls, interacting with the SQLite database. How does it do on the more "exciting" (ahem) parts of Android like Bluetooth? I lean heavily on RxAndroidBLE to cope with the rubbish bluetooth stack and I think the code around that could do with being simplified. |
|
As for the DB layer, I quite like JDBI which integrates well with Kotlin also: https://jdbi.org/#_kotlin
I'm not familiar with RxAndroidBLE, but they have some Kotlin examples on GH: https://github.com/Polidea/RxAndroidBle/blob/master/sample-k...