# 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: tutorial

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>), [Android](<https://devfeed.tech/topics/android.md>), [cameraX](<https://devfeed.tech/topics/camerax.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [Code](<https://devfeed.tech/topics/code.md>), [ui](<https://devfeed.tech/topics/ui.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [apple](<https://devfeed.tech/tags/apple.md>), [camera](<https://devfeed.tech/tags/camera.md>), [camerax](<https://devfeed.tech/tags/camerax.md>), [code](<https://devfeed.tech/tags/code.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [ios](<https://devfeed.tech/tags/ios.md>), [ml-kit](<https://devfeed.tech/tags/ml-kit.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [native](<https://devfeed.tech/tags/native.md>), [ocr](<https://devfeed.tech/tags/ocr.md>), [on-device](<https://devfeed.tech/tags/on-device.md>), [platform](<https://devfeed.tech/tags/platform.md>), [recognition](<https://devfeed.tech/tags/recognition.md>), [ui](<https://devfeed.tech/tags/ui.md>)

## AI overview

This tutorial explains how the GalwayBus app scans six-digit bus stop codes using on-device ML Kit on Android and Apple's Vision framework on iOS. Camera preview, matching logic, and UI are shared through Compose Multiplatform, while platform-specific implementations handle camera access and OCR. Recognized six-digit runs are matched exactly to stops, and overlapping recognition requests are avoided by dropping newer frames.

## 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.