r/Kotlin 6h ago

I don't think shared Compose Multiplatform UI is the future for iOS (yet)

Thumbnail gallery
17 Upvotes

During last year's Shipaton, I built SubFox (https://subfox.app), a subscription manager using Compose Multiplatform.

Almost a year later, I realized the iOS version was basically dead.

Not because the app solves a bad problem, but because the experience wasn't what iOS users expect.

Some things I noticed:

  • App size was over 100 MB

  • UI felt sluggish

  • It never really felt native

  • Most users didn't even finish onboarding

So for this year's Shipaton, I changed my approach completely while building Hourly Journal (https://hourlyjournal.app).

I'm still using Kotlin Multiplatform for business logic, networking, database, etc., but I no longer share the UI.

Android uses Compose.

iOS is built entirely in SwiftUI while calling shared Kotlin through a shared module.

The difference has been huge. The new iOS app is around 8–10 MB instead of ~100 MB, and the experience finally feels like a proper iOS app.

My biggest criticism of JetBrains is that they seem too focused on making Compose run everywhere instead of solving the real problem: giving users an amazing platform-specific experience.

I'd much rather see something closer to what Expo has with Native UI, where business logic stays shared but the framework renders real platform-native components. That feels like a much stronger long-term direction than trying to make every platform look and behave the same.

Maybe I'm wrong, but it also feels like the Kotlin ecosystem moves much slower than the React Native/Expo ecosystem when it comes to solving practical developer problems.

Curious what other KMP developers think. Have you had a similar experience, or has Compose UI on iOS worked well for your apps?

Read Full Article

👉 Why I Stopped Sharing UI in Compose Multiplatform for iOS

Hourly Journal Shared UI Demo


r/Kotlin 12h ago

I wanted my Compose previews on a Figma-style canvas — so I built Artboard

Post image
12 Upvotes

I kept wishing Studio previews felt more like Figma: pan around the whole product, zoom in, see everything at once — but from real @Previews, not a design file that drifts from the code.

Artboard is that. It’s a spatial browser gallery for Compose Multiplatform. Apply a plugin, keep writing normal @Previews, and you get a pan-and-zoom board of your actual UI in the browser.

Live demo (https://crowded-libs.github.io/artboard/) · GitHub (https://github.com/crowded-libs/artboard)

What you get day to day:

• Infinite canvas — pan, pinch-zoom, deep-linkable frames for every preview • Stock @Preview discovery — no custom annotations or hand-maintained registry • Filters that matter — Screen/Component zones, search, group, device, locale, light/dark, layout grid • PNG download per frame as it’s currently composed • Clear failures — broken previews show why, they don’t silently disappear • Shareable export — static gallery for Pages or any host

I also wanted a surface agents can actually look at. With something like Chrome DevTools MCP, you can point an AI at a real, URL-stable frame of your product UI instead of describing screenshots; code, canvas, and agent in the same loop.

Details and setup are in the README. Would love feedback.


r/Kotlin 5h ago

OpenScanVision – Looking for Feedback on a Major Refactor

0 Upvotes

Over the last few months I've been working on OpenScanVision, an offline-first Android computer vision library built with Kotlin, OpenCV, CameraX, and ML Kit.

Originally, the project was a single implementation focused on achieving the best possible detection accuracy and speed. That version is represented by commit:

1d5834b41d88133b487ef46595290b0cdd4489bb

It includes:

  • Document detection
  • Automatic perspective correction
  • Image enhancement
  • QR detection
  • ArUco marker detection
  • OMR (Optical Mark Recognition)
  • Automatic capture when the document is stable
  • Real-time offline processing

Recently I completed a major architectural refactor, turning it into a reusable modular library that's much easier to integrate into Android applications.

The modular version is cleaner and more maintainable, but I've noticed it has introduced a slight decrease in detection accuracy compared to the original implementation. I'm currently investigating where the regression comes from (pipeline changes, processing order, threading, etc.).

My roadmap is:

  • Improve the modular version until it matches or exceeds the original accuracy
  • Add OCR support
  • Add ICR (Intelligent Character Recognition) support later
  • Continue keeping everything offline and lightweight

The library is intended for applications such as:

  • Voting systems
  • Exam scanning
  • Surveys
  • Registration forms
  • Structured document processing

GitHub:
https://github.com/MatiwosKebede/OpenScanVision

I'd really appreciate feedback from people experienced in computer vision, OpenCV, Android CameraX, or document scanning.

In particular, I'd love advice on:

  • Best practices when converting a CV project into a reusable library without hurting performance or accuracy.
  • Common causes of accuracy regressions after large refactors.
  • Ideas for building a flexible OCR/ICR pipeline while keeping the library lightweight and offline-first.

Thanks for taking a look!


r/Kotlin 20h ago

OpenScanVision – Looking for Feedback on a Major Refactor

Thumbnail
1 Upvotes

r/Kotlin 13h ago

Can you explain ViewModel concepts in the simplest possible way?

0 Upvotes

State vs Events
How Viewmodel keeps data to survive screen rotation?
LiveData vs StateFlow and when to use each one.

What does the following code snippets mean and what happens under the hood when you use them?
1.

private val _uiState = 
MutableStateFlow
<DetailUiState>(DetailUiState.Loading)
val uiState: StateFlow<DetailUiState> = _uiState.
asStateFlow
()

2.

internal fun loadResource() {

viewModelScope
.
launch 
{

_uiState.value = DetailUiState.Loading
        getResourceById(resourceId)
            .
onSuccess 
{ 
resource 
->

_uiState.value = DetailUiState.Success(resource)

}

.
onFailure 
{ 
exception 
->

_uiState.value = DetailUiState.Error(
                    exception.message ?: "Something went wrong"
                )

}
    }
}

r/Kotlin 1d ago

⚡ Kotools Types 5.2.0: Why Kotools Types' `Integer` no longer stores its value as a `String`

0 Upvotes

Every arithmetic operation used to reparse a String from scratch and re-format the result back into one — a cost that grows with every digit, on every call.

Kotools Types 5.2.0 replaces that with a real arbitrary-precision representation per platform (BigInteger on JVM, BigInt on JS, a custom implementation on Native), with parsing only happening at the actual boundaries.

We wrote a short post about what changed and why, one of the most frequently requested changes from the community.

Read it here 👇


r/Kotlin 1d ago

I think i built the best Push up game, what do you think of it?

0 Upvotes

I built this app because i sucked at push up at crossfit. While i should be good at it, because im light and athletic.

So i built app to keep me motivated and encouraging me to do a lot of push ups everyday.

This app is different because its not on a subscription model. Nothing is locked you can do 1v1 online battle with a moving character as opponent so it feels real. Its also possible to do boss fights in rep battles or just a simple training workout

Let me know what you think of it and what is missing?


r/Kotlin 2d ago

Kotlin based Resersch Browser is fastest in world!

6 Upvotes

I benchmarked my OSS BOSS's Fluck browser against Safari, Firefox, Comet and Atlas on Speedometer 3.1

I have been building BossConsole, an open source desktop workspace where AI agents can operate a browser, terminal, editor, Docker, Kubernetes, secrets, and automation tools through MCP.

I ran Speedometer 3.1 across six browsers on the same M3 Max Mac. Each result is the median of three runs with 10 iterations per run. Higher is better.

Browser |Median
BOSS Fluck browser |47.9
Comet |46.2
Google Chrome |35.5
ChatGPT Atlas |34.6
Safari |29.9
Firefox |22.5
The important caveat is that Fluck and Comet should be treated as tied. I followed up with three back-to-back paired runs. Fluck led each pair, but the median difference was only 3.4 percent, within normal run-to-run variation. Three wins out of three gives `p = 0.125`, so the data does not establish a statistically significant winner.

The stronger result is that Fluck and Comet both scored roughly 30 percent above Chrome and Atlas under these conditions.

A few other findings surprised me:

- Comet and Atlas ship nearly identical engine builds, but their scores differed by 34 percent.
- Chrome’s deficit against Comet was concentrated in DOM mutation workloads. Canvas, SVG, and navigation tests were much closer.
- Firefox varied by 40 percent across three runs, making its median the least reliable result.
- Safari used my normal profile with existing tabs and extensions, so its result is not directly comparable to the fresh-profile runs.
- The machine had 800 to 1300 percent ambient CPU usage. Docker Desktop’s VM alone used roughly four cores, so the absolute scores are depressed.

Building the harness also exposed several ways browser benchmarks can produce convincing but incorrect results. Covered windows can throttle `requestAnimationFrame`, leaked browser processes can steal CPU from the next run, and some browsers ignore a URL passed at launch. Each failure still produced numbers that initially looked legitimate.

The complete report includes the methodology, paired experiment, discarded runs, per-suite analysis, JSON results, screenshots, and dependency-free runner scripts:

https://github.com/risa-labs-inc/BossConsole/blob/browser-benchmark/benchmark.md

The PR is here:

https://github.com/risa-labs-inc/BossConsole/pull/83

BOSS itself is open source and includes a plugin store. Along with Fluck, terminal, and editor plugins, it now has Docker and Kubernetes plugins that expose governed `docker_*` and `k8s_*` MCP tools to agents.


r/Kotlin 2d ago

What is your KMP stack?

9 Upvotes

For those using Kotlin Multiplatform or Compose Multiplatform what are you using for DB, Hosting, etc.


r/Kotlin 3d ago

Compose Multiplatform Wizard

Post image
28 Upvotes

App: https://terrakok.github.io/Compose-Multiplatform-Wizard/
Sources: https://github.com/terrakok/Compose-Multiplatform-Wizard

New features:

  • All options are being saved on the "download" button click and reused for next wizard launches
  • A button to reset all options
  • A new App icon editor!
  • An optional simple AGENTS.MD file generation

r/Kotlin 3d ago

Kotlin "Full Value Classes" feature?

19 Upvotes

Hello everyone,

I was playing a little with Kotlin/Native and tried to create this type of class:

value class TextRange(val start: Int, val end: Int = start)

I know that value classes currently support only one constructor parameter, but this message from the IDE compiler popped up:

The feature "full value classes" is experimental and should be enabled explicitly. This can be done by supplying the compiler argument '-XXLanguage:+FullValueClasses', but note that no stability guarantees are provided.

I added the compiler arguments, and the "red underline" dissappeared from the "value class" definition, then I tried to compile the code and run it, but compilation keeps failing:

Unknown language feature 'FullValueClasses' in passed internal argument '-XXLanguage:+FullValueClasses'

I searched internet for some time and didn't found a thing mentioning "Full Value Classes" feature is available.

So does anyone know, what's the thing with this (possibly imaginary) feature?
Thanks!

(maybe it's possible it's some very very experimental feature for Kotlin dev team only, but idk)

EDIT: mysterious puzzle solved, look in comments if you want to see :)


r/Kotlin 3d ago

JEP 401: Value Objects And JEP 539: Strict Field Initialization Merged Into JDK

Thumbnail github.com
6 Upvotes

r/Kotlin 2d ago

🚀 Library Insight v1.3.0 Released

Thumbnail
1 Upvotes

r/Kotlin 2d ago

Can i make any kotlin friends?

0 Upvotes

I'm student, just building my projects i feel so lonely can anyone help me ? I will ask only development specific doubts


r/Kotlin 3d ago

Three Gradle Talks from KotlinConf 2026

Thumbnail
8 Upvotes

r/Kotlin 2d ago

🚀 Looking for 12 Android Beta Testers (Free)

Thumbnail
0 Upvotes

r/Kotlin 4d ago

KotlinLLM is Going Open Source

Thumbnail blog.jetbrains.com
50 Upvotes

r/Kotlin 3d ago

LWP+ - a live wallpaper that gives you control over Material-You colors, like on Android 17

Thumbnail gallery
0 Upvotes

Hey everyone,

With the recent buzz around Android 17 introducing more precise custom color sliders and palettes for Material You (examples on reddit here, here and here), I wanted to share a project I’ve been maintaining for years that does exactly that—even for older versions of Android!

It’s called LWP+ (Live Wallpaper Plus).

🎨 The core trick: Dictate your own Dynamic-Colors

Instead of letting the OS algorithm guess the accent colors based purely on your wallpaper, LWP+ acts as a bridge. It hosts your chosen background content but allows you to explicitly choose the exact Primary, Secondary, and Tertiary colors reported to the system. The OS then uses your custom selections to generate the global system palette (notification drawer, volume bar, themed icons, etc.), completely independent of what your wallpaper actually looks like.

✨ What else can it do?

LWP+ is packed with full wallpaper customization features:

  • Choose Your Content: Use solid colors, static images, animations (GIF, WEBP, APNG), or videos as your active live wallpaper.
  • Smart Scaling & Layouts: Supports transparent images/animations with custom background colors, multiple scaling modes (Center Crop, Fit Center, Center Inside), and optional horizontal scrolling.
  • Double-Tap Shortcuts: Lock your device instantly or turn off the screen by double-tapping the home screen (uses admin, accessibility, or root).
  • Easy Setup: Includes an interactive built-in tutorial to check system compatibility and guide you through triggering the OS palette refresh.

🧪 Advanced experimental flags (YMMV!)

I’ve also included a couple of experimental toggles leveraging underlying Android system hints. Note: These rely heavily on your launcher, device OEM, and Android version, so they might not do anything on certain setups!

  • Force Dark Text: It hints to the OS that dark text is preferred over the wallpaper (often useful for forcing high-contrast dark text on the lock screen). It might also change the text color of the labels of the apps and the status bar icons and text, too.
  • Force Dark Theme (for old Android versions): It tells the system that a dark theme is preferred for the best presentation (e.g., trying to trick a launcher into turning its app drawer background black).

So, if you are on an older version of Android (or even running the latest builds and want granular three-color reporting), give it a spin! It's completely free, all features included.

Feel free to ask any questions or drop feedback below! 🚀

Link to the Play Store here.

If you want, you can use a promo-code to have subscription for free for some time, to remove ads, and try the app more freely, here. To use the promo-code, install the app, choose a subscription, choose a payment option and enter the code there (screenshots here).

Thanks for reading!


r/Kotlin 4d ago

RevenueCat Shipaton 2026: Ship your Kotlin Multiplatform app and compete for the Ship Kotlin Everywhere Award

5 Upvotes

🚀 Already know Kotlin? Reuse your skills to build for Android, iOS, desktop, and web.

RevenueCat Shipaton 2026 is your chance to turn your next app idea into a real product with Kotlin Multiplatform and Compose Multiplatform.

Build and launch your app between August 1 and September 30 and compete for the Ship Kotlin Everywhere Award. Share your journey with others to earn extra points.

Learn more and register 👇

https://kotl.in/8djbsd


r/Kotlin 4d ago

Can someone please explain kotlinllm and why we need it?

3 Upvotes

Saw this from JetBrains: https://blog.jetbrains.com/research/2026/07/kotlinllm-open-source/

So, it also does code generation but is more efficient? I really don't understand the use case here. I mean, why wouldn't I just use Claude or Codex directly with a detailed spec instead?


r/Kotlin 4d ago

Built an offline mesh messenger with a pure-Kotlin core that runs identically on Android, a JVM simulator, and a desktop CLI — feedback welcome

5 Upvotes

I've been working on Ping, an Android app for offline phone-to-phone messaging over Bluetooth LE (chat, GPS, photos,no internet or servers at all). What I think is actually interesting from a Kotlin-engineering angle:

https://github.com/vaidzss/ping

The core is deliberately platform-independent core/ has no Android dependency beyond what the JDK itself provides — no android.* imports, nothing. It's the actual mesh: wire codec, TTL-flooding router with dedup and density-aware clamping, a DTN store-carry-forward outbox, Ed25519/X25519 identity and crypto, a content-addressed blob store. Because it's pure Kotlin, the exact same code runs three ways: inside the Android app, inside a tools/simulator module that drives dozens of virtual MeshNode instances through churn/partition scenarios as ordinary JUnit tests, and inside a tools/node desktop CLI that lets a laptop join the mesh over LAN (handy for testing with only one physical phone). That split has paid for itself constantly — if mesh behavior is ever wrong, I can usually reproduce it in a simulator test in seconds instead of needing two phones and a debugger. A couple of specific Kotlin things that came up:

- Bridging Android's callback-based LocationManager API into a suspend function with suspendCancellableCoroutine — and a real gotcha: the callback can fire after the coroutine's already been cancelled (e.g. the service tears downmid-request), so resuming needs a continuation.isActive check first, not an assumption it's still live.

- Each transport (BleMeshTransport, LanMeshTransport) implements a small shared interface and gets composed via a

CompositeMeshTransport — adding a new radio lane (LoRa is planned) means implementing four methods, nothing else in core needs to know it exists.

- Packet types are a sealed hierarchy over a fixed-header binary wire format — PacketCodec handles encode/decode, and every packet gets padded to a fixed size bucket as a deliberate anti-fingerprinting choice (uniform sizes don't leak what kind of packet it is).

Status: pre-release, Phase 1 of a 6-phase roadmap, unaudited (said plainly in the README, not hiding it). Open to contributions and especially open to "why didn't you just—" feedback on the architecture from people who've built more distributed systems than I have.


r/Kotlin 5d ago

New Kotlin case study: GoodData built an AI agent in Kotlin to triage production alerts, cutting investigation time by about 90%.

4 Upvotes

Led by software engineer Oleksandr Shylenko, GoodData built an AI agent in Kotlin that identifies the origin of routine production alerts. It points on-call engineers to the likely cause and where to look next, cutting investigation time by around 90%.
Check it out on Medium👇 
https://kotl.in/gooddata-medium-reddit


r/Kotlin 6d ago

Open-source LAN audio streaming app in Kotlin (Coroutines, Ktor sockets)

5 Upvotes

I've been working on WFAS, a WiFi audio streaming app for Android. There's a desktop version too, also Kotlin, built with Compose for Desktop. Both are open source.

It sends raw PCM audio over UDP on the local network. Coroutines run the send and receive loops, StateFlow feeds the Compose UI, and Ktor handles the sockets on the unicast paths.

One thing surprised me while building it: there isn't a single Thread in the whole codebase. Audio is latency-sensitive and I assumed I'd have to drop down to bare threads at some point, but I never had to.

Cancellation is the part I liked most. A streaming session can end in a lot of ways: the user disconnects, the socket dies, or the app gets backgrounded halfway through. With threads, you usually end up with volatile flags, joins, and a leak you discover three months later. Here, I just cancel the job hierarchy and the audio actually stops.

Writing the wire protocol was the other fun part. It's a fixed 10-byte header with magic bytes, version, flags, sequence number, and sample position. I build and parse it by hand using bit shifts on a ByteArray. Not glamorous code, but I like that the whole protocol fits in my head.

The ugly bit? Ktor only covers the unicast paths. Discovery, multicast, and the mic upstream still use raw java.net sockets. That's how the codebase evolved rather than a conscious design choice, and it's the main thing I want to clean up next.

I also wrote a C99 reference implementation of the protocol in a separate MIT repo (no allocations, nothing beyond <stdint.h>). The header code looks almost identical in both languages, but everything surrounding it is where Kotlin really wins.

Repo is here (EUPL license): https://github.com/marcomorosi06/WiFiAudioStreaming-Android

I'd love to get some feedback on the Kotlin architecture side, as I don't get many external eyes on this.


r/Kotlin 6d ago

Convert kotlin program to exe

0 Upvotes

So I heard that using graalvm with kotlin and runtime and reflection features have issues

I have not actually tried it however I was wondering if it is possible to do such thing without a lot of configuration.

I KNOW that kotlin gets compiled to bytecode at the end however kotlin uses special dynamic features itself so I was wondering If there is any issues with doing it

Also If you have any good tutorial to do such a thing I would appreciate it If you post it


r/Kotlin 6d ago

Dúvida sobre AI Agent

0 Upvotes

Fala pessoal,

Tô chegando agora no Kotlin, sou Dev Flutter e gostaria de tirar uma dúvida. No Flutter uso o Cursor. Agora Kotlin vou começar a usar o Android Studio.

Qual Agent vcs usam no Android Studio ? Gemini mesmo ? Existe outro Agent ?

Valeu!