Berkay Bakaç

← Back to the map

Case study · Mobile · backend

Retail Price Checker

An Android price-check kiosk that shows the price for this store and sale unit, even when a shopper scans again before the first reply arrives.

The same barcode can have different prices in two stores, and a slow reply for the last item must never replace the item now on screen.

price lookups handled by the API
6,900+
mean time spent calling the ERP price source
About 16 ms
engineer from kiosk app to installer and handover
Sole

Stack: .NET · SQL Server · Android · Kotlin · Windows

Which price belongs on the screen?

I built the Kotlin kiosk and the .NET API on the chain’s Windows server. Staff assign each terminal to a store. When a barcode arrives, the API takes the depot and price list from that assignment and makes one read-only query to the SQL Server ERP.

For each sale unit the API prefers the eligible depot price, then the general price. A pack has its own price entry. A missing amount stays unpriced. The kiosk highlights the scanned unit when it has a price and shows the other available unit prices alongside it.

The Android kiosk highlights the scanned pack and shows the single-unit price beside it.
The kiosk screen uses a test product and barcode.

The next barcode gets the screen

A shopper can scan another item while the ERP is answering. Even scanning the same item again starts a fresh lookup. The app cancels the previous request and gives the new scan its own ID.

I kept the ID check because a response can outlive cancellation. Both the reply and the timer that dismisses it have to match the current scan. A regression test deliberately lets the old reply arrive late and checks which result stays on screen.

What can wait for a lookup

When…What the system does
Usage storage is busyPrices can still return while a background worker writes receipts to SQLite. A full queue drops receipts, so the retained count can understate usage.
The ERP has conflicting barcode mappingsThe API stops the lookup. It needs an unambiguous mapping before it can show a price.
A tablet update arrives during a scanAndroid stages the download. Installation waits until the kiosk is focused and idle.
The tablet loses its setup replyRepeating setup at the same server reuses the pending key. In rehearsal the retry recovered the original terminal identity.

Timing the query and checking the screen

The November 2026 export held 6,900+ lookup outcomes. The API’s price-source call averaged about 16 ms across them. The timer starts at the service and ends when the price source answers. Network travel to the kiosk and screen rendering fall outside that measurement. Field measurements

For an office check with a test price source, I followed physical scans from the first key to the recorded display frame. Three failing barcodes had already arrived short at the input layer. A separate tablet rehearsal checked that scans could complete during an update download.