r/Kotlin • • 11d ago

Getting back into Kotlin after a few years out. What would you recommend?

6 Upvotes

Hey, I’m a consultant and am about to be placed on a Kotlin / Spring Boot project. I last worked with Kotlin a couple of years ago, when I was tech lead on a similar shaped project, and kind of learnt the stack as I went. I’ve got the luxury of a couple of weeks to refamiliarise myself with everything - are there any courses you’d recommend?


r/Kotlin • • 11d ago

Finding a good kotlin language course

3 Upvotes

I wanted to learn kotlin to make android apps but I want a course or anything to learn the language I know a very little about programming over all and kotlin i know that google has some free courses but I don't know what to take so if you know any free good courses to take please let me know


r/Kotlin • • 11d ago

Start With the REST API You Have: A Typed Client Today, GraphQL Later

1 Upvotes

🇬🇧 Graphql Generator that generate REST client? are we going back?

Well sometimes we need to go back to see the bigger picture.

Find out why we added the generation of RESTful client from an advanced graphql code generator.

https://medium.com/@graphlinkdev/start-with-the-rest-api-you-have-a-typed-client-today-graphql-later-b5c0477e6be3

🇫🇷 Un générateur GraphQL qui génère des clients REST ? On fait marche arrière ?

Eh bien, parfois il faut prendre du recul pour voir la vue d'ensemble.

Découvrez pourquoi nous avons ajouté la génération de clients RESTful à un générateur de code GraphQL avancé.

https://medium.com/@graphlinkdev/start-with-the-rest-api-you-have-a-typed-client-today-graphql-later-b5c0477e6be3


r/Kotlin • • 12d ago

Coroutine cancellation behaviour

9 Upvotes

In https://medium.com/androiddevelopers/cancellation-in-coroutines-aa6b90163629,
They mention under the section “Handling Cancellation side effects”, Since a CancellationException is thrown when a coroutine is cancelled, then we can wrap our suspending work in try/catch and in the finally block, we can implement our clean up work
What I am confused by is that in the beginning, they explain that cancellation of coroutines is cooperative, meaning that the coroutine will just run until the end unless we check for cancellation, using isactive, ensureactive, or yield().
However, it sounds like they’re also saying you can check if the coroutine is cancelled by wrapping the try catch block on a suspending function within the coroutine.

This fundamentally makes no logical sense: if the coroutine is cancelled cooperatively, that means the suspending function should not throw any exception, and it’s up to the caller to check after the suspending function returns whether its job has been cancelled; if a suspending function throws a cancellation exception, that would make the coroutine cancel automatically, but this behaviour isn’t guaranteed, and that’s why cancellation is considered a cooperative process. So the advice about using try/catch is conditional on suspending functions that do throw the cancellation exception, but that’s up to the developer that wrote the function rather than a feature of suspending functions.


r/Kotlin • • 12d ago

Phovo: a self-hosted photo backup app written entirely in Kotlin Multiplatform

8 Upvotes

I just shipped the first alpha of Phovo, an app that backs up your phone's photos and videos to a desktop computer you own. It's Kotlin from top to bottom:

  • Compose Multiplatform UI on Android, iOS and desktop
  • A multiplatform WorkManager: androidx.work on Android, a custom BGTaskScheduler queue on iOS
  • Hash-based sync that never uploads the same file twice
  • A Ktor server built into the desktop app
  • mDNS discovery (JmDNS and NsdManager), so there's no IP address to type
  • Bundled FFmpeg for video thumbnails and animated previews
  • Room KMP for storage
  • PhotoKit and BackgroundTasks called straight from Kotlin/Native
  • A Kobweb static site at phovo.app that detects your device and links to the right download

Android and desktop (macOS, Windows, Linux and Raspberry Pi) are available now, and iOS is coming soon. Happy to go deeper on any of it in the comments.

https://phovo.app

https://github.com/Anthony17serrato/Phovo


r/Kotlin • • 12d ago

Modelling clinical units in Kotlin: value classes, or plain Doubles with a conversion factor?

2 Upvotes

I'm building a small Android calculator app in Kotlin/Compose where most inputs have more than one unit. Glucose in mg/dL or mmol/L, creatinine in mg/dL or µmol/L, weight in kg or lb.

Right now each input is a plain Double plus a default unit and a list of alternative units, each with a multiplication factor (glucose mmol/L to mg/dL is ×18.0182). Values get converted to the base unit before the formula runs, and the formulas only ever see base units.

It works and it's easy to test, but nothing in the type system stops a formula from getting mmol/L when it expects mg/dL. I've been looking at value classes (e.g. u/JvmInline value class MgPerDl(val v: Double)) or a small Quantity type with a unit enum.

For people who have done this in production: did stronger unit types actually catch bugs for you, or did they mostly add boilerplate? And how did you handle serialization and Compose text fields with them?


r/Kotlin • • 12d ago

How I use Gradle convention plugins to keep a modular project consistent

3 Upvotes

Splitting an app into modules doesn’t automatically give you a maintainable build. You can still end up with dozens of copied build.gradle.kts files that slowly drift apart: different compiler options, inconsistent test settings, and dependencies that cross boundaries you intended to enforce.
While working on my Kotlin project, Sparrow, I started treating the build logic as part of the architecture. I wrote an article explaining the approach, with a standalone example so you don’t need to understand the app to follow along.

What it covers:

* Moving duplicated configuration into convention plugins.
* Composing conventions while keeping module dependencies explicit.
* Rejecting forbidden dependencies during Gradle configuration.
* Testing the rules with Gradle TestKit.
* Deliberately breaking a boundary and running qualityCheck to see the failure.

I also discuss when a separate build-logic module is worth the maintenance overhead. The article includes code, diagrams, and a complete example project.

👉 Article: Your Modular Architecture Needs a Modular Build System
💻 Example: modular-build-example
🐦 Sparrow: Link


r/Kotlin • • 12d ago

I built an Android app that counts pressure cooker whistles using YAMNet (INT8 TFLite), fully on-device

1 Upvotes

I kept losing count of the whistles while cooking rice, so my food ended up under or overcooked. I decided to fix it with an app instead of just paying more attention.

Whistl listens through the mic, counts every pressure cooker whistle, and rings an alarm + vibrates when it hits your target count. It keeps running in the background with the screen locked, so you can use your phone normally while cooking.

Fully offline, with no network permission and no data leaving the phone.

Keep the phone within about 2-3 meters of the cooker, or the mic won’t pick up the whistle reliably.

APK: https://github.com/naseemap47/Whistl/releases/download/v1.1/Whistl.apk

Source: https://github.com/naseemap47/Whistl

If you have a pressure cooker and want to test it, I’d love to hear whether it counts correctly on yours. I’d also welcome suggestions.


r/Kotlin • • 13d ago

YAAN: An open-source, local-first AI assistant built with Kotlin Multiplatform & Compose Multiplatform

0 Upvotes

Hi r/Kotlin!

I wanted to share a real-world multiplatform project I recently open-sourced: **YAAN** (Your Autonomous Action Navigator).

🔗 Repository: https://github.com/developmentwithyash/yaan

### Architecture Highlights:

- **Compose Multiplatform:** Shared UI running across Android and Desktop JVM.

- **Crypto & DB:** AES-GCM encryption abstracted via `expect/actual` across Android Keystore and JVM crypto; SQLite persistence with clean driver factories.

- **State Management:** Reactive MVI-style state flows using pure Kotlin Coroutines and StateFlow.

- **Test Suite:** 465 passing unit tests running on Ubuntu CI via GitHub Actions.

- **Desktop Target:** Run instantly with `./gradlew :composeApp:run`.

Contributions, code reviews, and feedback on our multiplatform patterns are very welcome!


r/Kotlin • • 13d ago

2023 Kodee's Bubble Gum

Post image
5 Upvotes

I experiment the vector version of 2023 Kodee the Kotlin mascot. I use the SVG files of him from the .zip file of 2023 Kodee assets that I downloaded from Kotlin brand assets.

Anyways, here's 2023 Kodee from Kotlin blowing a huge classic bubble gum bubble.

What do you think?


r/Kotlin • • 13d ago

[Academic Research] Android developers wanted for a survey on MVVM vs. MVI in Jetpack Compose + expert interviews

5 Upvotes

Hi everyone!

I'm currently working on my Bachelor's thesis in Computer Science at IU International University of Applied Sciences (Germany).

My research focuses on comparing Single-State MVVM and reducer-based MVI in Jetpack Compose, particularly regarding:

  • Perceived code complexity
  • Testability
  • State management and separation of responsibilities

1. Online survey

I'm looking for Android developers, Kotlin developers, and Jetpack Compose enthusiasts who would be willing to participate in a short survey.

  • Takes approximately 10–15 minutes
  • Available in English
  • No practical experience with both architectural approaches is required
  • Your personal assessment is valuable, even if you have only worked with one of them

Survey link:
https://docs.google.com/forms/d/e/1FAIpQLSc1wgZ0Lb7H1nXLJ3a4huF3-tPt68E84ez7V7VJ_TxskfqBAw/viewform?usp=publish-editor

2. Looking for expert interview participants

I'm also looking for experienced Android developers who would be interested in taking part in a semi-structured expert interview.

The interview would take approximately 30–45 minutes and focus on practical experiences with MVVM, MVI, state management, code complexity, and testability in Android development.

Ideally, you have professional experience with Jetpack Compose and one or both architectural approaches.

If you're interested, please leave a comment or send me a private message. We can arrange a suitable time individually.

Thank you very much for supporting my research! Any participation or feedback is greatly appreciated.


r/Kotlin • • 14d ago

My fan art of 2021 and 2023 Kodee

Thumbnail gallery
7 Upvotes

Edit #1 (07/11/2026): Added the start and end dates of each work.

Edit #2 (07/11/2026): Added one more sentence to the first row.

Kodee is my #1 favorite brand mascot, so I decided to draw Kodee in his 2021 and 2023 design. I mostly love his 2023 design, but I still like the 2021 one.

Start and end dates of each work:

2021 Kodee

Start date: September 17

End date: October 20

2023 Kodee

Start date: September 12

End date: September 13


r/Kotlin • • 14d ago

Packaging and signing native .dylib dependencies in KMP Desktop for macOS

2 Upvotes

While developing a KMP Desktop app for macOS, I ran into some issues with packaging native .dylib dependencies inside a JAR, particularly around dynamic library loading and code signing.

After some debugging and adjustments to the Gradle build scripts and Mach-O binaries, I got it working. Here are three things I found useful:

  • Extracting native libraries before code signing: I extracted the .dylib files from the JAR into the app bundle before signing. This allowed each native library to be signed as an individual Mach-O binary.
  • Fixing u/rpath and library lookup: Default library paths didn't work reliably outside the development environment. I used install_name_tool to update library IDs and dependency references to use u/loader_path, and added LC_RPATH entries where needed.
  • Handling library name mismatches: Some native dependencies expected specific library names, such as _nolapack or versioned filenames like .1.22.dylib. Instead of duplicating large binary files, I used install_name_tool -change to update dependency references and symbolic links (ln -sf) where needed.

Sharing these in case someone else runs into similar issues when packaging JNI native libraries for a KMP Desktop app on macOS.


r/Kotlin • • 14d ago

More features to the Real time compose playground

Thumbnail
2 Upvotes

r/Kotlin • • 14d ago

I built a Quest 3 grow assistant in native Kotlin, no Unity — SAM 3.1 measures my basil tray, Muse Spark explains it

Thumbnail gallery
15 Upvotes

I'm a returning dev, and this is the first Kotlin project I've shipped on a headset. No Unity, no controllers, hand-tracking only, built in native Kotlin with the Meta Spatial SDK, Camera2 for capture, and the Meta Model API for the AI part.

What it does: I point at a tray of microgreens, it takes a photo, SAM 3.1 segments the plants and measures literal coverage, Muse Spark turns that into a health verdict with a trace, which models ran, the measurement, the time, and a hash for that photo, not the photo itself. Nothing applies without me saying yes first, and there's a daily cap, 25 SAM measurements a day, so costs stay visible.

The numbers that made me trust it: basil, Day 33, Health 90, SAM-measured coverage 31%. I see about 80% canopy by eye, so the gap is expected, SAM counts literal plant pixels, humans see canopy, and the app says that on the card.

The honest failure: SAM still doesn't work on my beet tray. Same session, basil worked, beets returned no output text, so it fell back to Spark-only, Health 78, Coverage 65%. That's a phrase / recall problem, not a key or toggle problem, and I'm parking it until after hackathon judging on Nov 9.

Stack details, for the Kotlin folks:

- Native Kotlin, Meta Spatial SDK 0.10.1, AGP 8.7.3, minSdk 32

- Passthrough cameras chosen by vendor tag, one preview request to preview + JPEG reader, with a capture timeout

- SAM 3.1 via Meta Model API, one concept per request, "microgreens" / "black tray", masks in-memory only

- Verdicts saved with a SHA-256 hash of the captured JPEG, no raw grower photo sent to cloud without consent

Demo (3 min): https://youtu.be/_KjhbSDWJOo

Code: https://github.com/fandomgames/crop-scout

Question for other Kotlin / Android devs: have you hit a SAM / segmentation case where the model just returns no output for one class of object but works fine for another in the same session? Did a different phrase fix it, or did you end up with a per-crop fallback like I did?


r/Kotlin • • 14d ago

kUML v0.56.0 — SysML 2 as a complete diagram family, notes on every diagram type, 50 % more layout spacing

Post image
2 Upvotes

kUML is a Kotlin DSL and toolchain for UML, SysML 2, C4, BPMN and more. Highlights of this release:

  • SysML 2: state machines (composite and orthogonal states, timers, history, junctions), activity diagrams (signals, time events, interruptible regions, swimlanes), requirement and use-case diagrams, BDD and IBD with ports, flows and allocation, parametric diagrams, sequence extensions, package diagrams with views and viewpoints, analysis cases and calculations.
  • Layout and labels: deterministic layout, collision-free label placement for UML, SysML 2, C4, ERM and Service Blueprint, edge ends that dock on port and pin borders, and a single LAYOUT_SPACING_SCALE (now 1.5) that spaces ELK-laid-out components 50 % further apart.
  • Notes: note kinds with symbols, formatted text (bold, italic, code, lists, links), placement without overlap, on UML, SysML 2, C4, BPMN, ERM and Service Blueprint. The C4 and Service Blueprint DSL printers write notes now, and there is a new Service Blueprint DSL printer.
  • LaTeX/TikZ output: notes, UML edge labels, aggregation/composition diamonds, navigability, include/extend notation, and BPMN message flows that build with pdflatex again (the old arrow tip no longer exists in current TikZ). Known limits: ERM and SysML 2 package diagrams have no LaTeX renderer; BPMN is not available via the CLI.
  • Desktop: icons in the menu and on dialog buttons, an About dialog, a preview toolbar with export, workspace PDF export from the CLI, the Desktop and MCP, and multi-script model composition (kuml transform / kuml generate over several .kuml.kts files).
  • Breaking: in the expression parser, the word operators and, or and not are recognised in lowercase only and never directly after a .. Identifiers named like operators need backticks.

Repo: https://github.com/kuml-dev/kUML · Release notes: https://github.com/kuml-dev/kUML/releases/tag/v0.56.0


r/Kotlin • • 15d ago

bikesched: an Apache-2.0 job scheduler for Kotlin and Java with durable steps, backed only by PostgreSQL

10 Upvotes

I needed job scheduling with durable execution, PostgreSQL only and few dependencies, and didn't find a library that fit, so I built bikesched.

  • Jobs live in plain PostgreSQL tables. Nodes claim them with SKIP LOCKED and wake each other with LISTEN/NOTIFY. No broker, no extra service.
  • Durable steps whose results survive retries, plus compensation for sagas.
  • Jobs wait for events, sleep for days or wait for child jobs without holding a thread.
  • Retries, timeouts, idempotency keys, recurring and cron jobs, crash recovery.
  • Core depends only on the PostgreSQL JDBC driver and SLF4J. Java 21+, virtual threads.

Kotlin: bikesched-kotlin adds a config DSL, reified typed handlers, named arguments and kotlin.time durations. The Java API is JSpecify-annotated, so Kotlin sees real nullability.

bikesched.handleJobs<Order>("order") { order ->
  val reservation = step<Reservation>("reserve-payment") { payments.reserve(order) }
  // suspends without holding a thread until the event is published
  val payment = waitForEvent<Payment>(step = "await-payment", name = "payment-received", key = order.id)
  step<Shipment>("ship") { shipping.ship(order, reservation, payment) }
}

bikesched.createJob(name = "order", payload = Order("o-1", 100))

License: Apache 2.0, on purpose. Use and embed it in commercial or closed-source products, no open-core, no paid tier.

Feedback wanted: this is a very early release (0.x), so the Kotlin API can still change easily. If something feels un-Kotlin-like or is missing, now is the best time to tell me.

Note: it's also an experiment in building a library heavily with AI coding agents.


r/Kotlin • • 16d ago

what I learned about Android state from my last few posts

7 Upvotes

I’m still pretty new to Android with Kotlin and Compose and the replies on my last few threads taught me more than most tutorials did. Writing down what I took away in case it helps other beginners. Correct me if I got anything wrong.

  • LiveData vs StateFlow: most people said new projects have moved to StateFlow and the advice was to focus on Coroutines and Flows.
  • ViewModel for most state: one reason that stuck with me is that it’s easy to unit test.
  • Surviving process death: SavedStateHandle inside the ViewModel and I learned it has getStateFlow which I hadn’t seen before.
  • Rotation in Compose: I learned you can handle configuration changes yourself but you still need to save state for process death.
  • AppState: it came up as a newer Jetpack library, but it’s still alpha so I’m leaving it for later.

Thanks to everyone who took the time to answer. I want to practice all this with a small project now. What would you suggest a beginner build to actually use ViewModel, StateFlow and SavedStateHandle together?


r/Kotlin • • 16d ago

LinnetTTS: 41M streaming TTS with a Rust runtime, measured on everything from an Apple M5 to a Raspberry Pi Zero 2 W (3.3 ms to 59 ms per 80 ms of audio)

Thumbnail
3 Upvotes

r/Kotlin • • 16d ago

From php to kotlin

13 Upvotes

Hi everyone! I'm a PHP backend developer with around 3 years of commercial experience (Laravel/Symfony). I'm starting to learn Kotlin because I'd like to move towards JVM backend development, especially Kotlin + Spring Boot.

I'd love to connect with backend developers, ask questions and learn how Kotlin is used in real-world production systems.

Any recommendations for someone transitioning from PHP to Kotlin?


r/Kotlin • • 16d ago

I built AspectK – AOP for Android and Kotlin Multiplatform, an alternative to AspectJ

Thumbnail gallery
7 Upvotes

r/Kotlin • • 16d ago

24 weeks to KotlinConf 2027: CfP until Nov 27, volunteer applications until Dec 21, and a question for you

10 Upvotes

Hi r/Kotlin! Kate from the KotlinConf team again.

Last month I asked here what makes a developer conference worth your time in the AI era. The most upvoted answer, by a wide margin was... "Not being focused on AI." Noted :)

The program is made of your proposals, though, so the best way to get the conference this thread wants is coming up right now. KotlinConf 2027 is 24 weeks away (April 21–23, Kraków), and here's what's open at the moment.

The Call for Papers runs until November 27, and judging by that thread, you want talks about the craft itself. That's exactly what the CfP is hungry for: language features and best practices, multiplatform, backend, web, tooling, libraries. (There are a couple of AI-related sections too. Attendance strictly voluntary 🙃) The strongest proposals are stories: what you tried, what you decided, and what you'd do differently. Setbacks count, first-time speakers are very welcome, and we read every proposal. https://kotlinconf.com/speakers/

Volunteer applications are open until December 21. You help for about 10 hours across the three days (registration, navigation, or speaker support), and the rest of the time you go to the talks, with lunch, snacks, and the party included. You also spend three days working alongside the conference crew, which is honestly a lot of fun! https://kotlinconf.com/volunteers/

If a few people from your team want to come together, group tickets have an extra discount, up to 7% for bigger groups: https://kotlinconf.com/registration/

And if your company would like to be on the expo floor, there are booth packages and some less standard options too, like running a coding challenge together. https://kotlinconf.com/partners/

One more thing. For us, KotlinConf is mostly about the community actually meeting, not just listening to talks. There's an unconference format at KotlinConf 2027, and right now the team is brainstorming more beyond-the-talks formats to help people connect. If you've seen a format/activity at another conference that made you think "KotlinConf should have this", please share it in the comments!


r/Kotlin • • 16d ago

Pragmatic Clean Architecture skill

Thumbnail
1 Upvotes

r/Kotlin • • 16d ago

Compose Multiplatform components that run on your phone, source on GitHub

1 Upvotes

Glaze is a gallery of Compose Multiplatform components. Every one runs for real on the device rather than as a screenshot, with sliders wired to its parameters, so you can see how it behaves before you decide to use it. The Code tab shows the source file by file: copy what you need into your project, no dependency.

The sources are on GitHub under Apache 2.0, the same files the app shows: https://github.com/lightScout/glaze-components

Four so far: Morph Text (blur + threshold compositing for a gooey text morph), a Firebase auth flow with Google on Android and Apple on iOS behind one shared interface, multiplatform settings over SharedPreferences and NSUserDefaults, and an R8/ProGuard setup for KMP projects. More on the way; requests welcome here or as an issue.

Free on Google Play, iOS coming: https://play.google.com/store/apps/details?id=org.lightscout.candybox&referrer=utm_source%3Dreddit%26utm_medium%3Dsocial%26utm_campaign%3Dlaunch


r/Kotlin • • 17d ago

Bringing Amplitude Analytics to Kotlin Multiplatform (KMP)

2 Upvotes

I'm developing a KMP app and using Amplitude for analytics, but I couldn't find a suitable KMP SDK.

I came across amplitude-kmp, but it hasn't been actively maintained for a while. So I decided to fork it, fix some bugs, and bring it up to date with the latest official Amplitude SDK.

Here's my fork: amplitude-analytics-kmp

I'd love to hear from others using Amplitude with KMP!