# Scanning bus stop codes with ML Kit and Vision in the GalwayBus Compose Multiplatform app

DevFeed: [Scanning bus stop codes with ML Kit and Vision in the GalwayBus Compose Multiplatform app](<https://devfeed.tech/articles/scanning-bus-stop-codes-with-ml-kit-and-vision-in-the-galwaybus-compose-multiplatform-app-25195.md>)

Original publisher: [Read original article](<https://johnoreilly.dev/posts/galwaybus-scan-stop-kmp/>)

Published: 2026-08-06T23:00:00Z

Content type: article

Language: en

Sources: [John O'Reilly](<https://devfeed.tech/sources/john-o-reilly.md>)

Topics: [compose-multiplatform](<https://devfeed.tech/topics/compose-multiplatform.md>), [ML Kit](<https://devfeed.tech/topics/ml-kit.md>), [cameraX](<https://devfeed.tech/topics/camerax.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [android](<https://devfeed.tech/tags/android.md>), [app](<https://devfeed.tech/tags/app.md>), [apple](<https://devfeed.tech/tags/apple.md>), [bus](<https://devfeed.tech/tags/bus.md>), [camera](<https://devfeed.tech/tags/camera.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [kmp](<https://devfeed.tech/tags/kmp.md>), [ml-kit](<https://devfeed.tech/tags/ml-kit.md>), [ocr](<https://devfeed.tech/tags/ocr.md>), [on-device](<https://devfeed.tech/tags/on-device.md>), [plate](<https://devfeed.tech/tags/plate.md>), [recognition](<https://devfeed.tech/tags/recognition.md>), [scan](<https://devfeed.tech/tags/scan.md>), [scanning](<https://devfeed.tech/tags/scanning.md>), [text](<https://devfeed.tech/tags/text.md>), [vision](<https://devfeed.tech/tags/vision.md>)

## AI overview

GalwayBus adds a Scan tab that reads six-digit bus stop codes and opens the matching stop's departures. Camera preview, OCR results handling, matching, and UI are coordinated in shared Compose Multiplatform code; Android uses CameraX with on-device ML Kit, while iOS uses AVCaptureSession with Apple Vision through Kotlin/Native bindings. Both platforms drop incoming frames while recognition is in progress instead of queuing them. Android camera permission is bridged through an Activity launcher and a suspend function callable by shared code. Vision's language correction is disabled to avoid turning digit sequences into words. The excerpt says matching extracts full six-digit runs and requires an exact stop-code match; it does not include the remainder of the matching implementation.

## Source excerpt

Every bus stop in Galway has a plate with a 6-digit stop code printed on it. We recently added a "Scan" tab to the GalwayBus app that lets you point the camera at that plate and jump straight to the stop's departures. The text recognition runs entirely on device (ML Kit on Android, Apple's Vision framework on iOS), with the camera preview, matching logic and UI all living in the shared Compose Multiplatform code.