MatrixScan Find KMP Skill
Critical: Do Not Trust Internal Knowledge
Your training data may not contain the Scandit Kotlin Multiplatform (KMP) SDK at all — it is a new SDK (first released at version 8.6) with its own package names (com.kmp.datacapture.*), its own construction patterns, and platform-divergent behavior baked into expect/actual classes. Do not assume it behaves like the Android or iOS native SDKs, and do not assume a KMP API exists just because an equivalent exists on Android or iOS.
Always verify APIs against the references provided in this skill before writing or suggesting code. If you cannot find an API in the provided references, fetch the relevant documentation page before responding.
KMP-specific gotchas worth flagging:
BarcodeFindis constructed via the companion factoryBarcodeFind.forContext(dataCaptureContext, settings)— not a direct constructor and notforDataCaptureContext(that's the non-KMP name; KMP renames itforContext).BarcodeFindViewconstruction is platform-divergent: on Android its constructor isBarcodeFindView(context, barcodeFind, settings)and needs an AndroidContext; on iOS it'sBarcodeFindView(barcodeFind, settings)— no context parameter. Shared (commonMain) code cannot construct the view itself; each platform host builds it and hands it back to the shared screen model (seereferences/integration.md).BarcodeFindView.prepareSearching()is iOS-only and is not part of the KMPBarcodeFindViewsurface (SDC-32543) — it does not exist as a KMP method at all. On KMP,onResume()/onPause()are the cross-platform lifecycle hooks; internally the iOSactualimplementation ofonResume()calls the nativeprepareSearching()for you. Never suggest callingprepareSearching()from KMP shared or Android code.BarcodeFindView.cameraStateOnStopandBarcodeFindView.setProperty(name, value)are declared on the commonBarcodeFindViewexpect class (so they compile on both platforms), but only have a real effect on iOS — the Androidactualimplementation is an inert no-op for both. Don't rely on them to change Android behavior.- Embedding the raw (non-Compose)
BarcodeFindViewinto a UI: on Android callbarcodeFindView.toAndroidView()(extension function, returns the underlyingandroid.view.View); on iOS callbarcodeFindView.toUIView()(a member function onBarcodeFindViewitself). These are two different call shapes — don't mix them up. BarcodeFind.setItemList(items: Set<BarcodeFindItem>)and the whole item-search flow only ever deal inBarcodeFindItem/BarcodeFindItemSearchOptions/BarcodeFindItemContent— never invent a "BarcodeFindItemList" collection type.BarcodeFindListenerhas a default (empty) implementation foronSessionUpdated(session), butonSearchPaused,onSearchStarted, andonSearchStoppedhave no default and must be implemented.- MatrixScan Find is commonly paired with SparkScan (scan a list first with SparkScan, then locate those items with BarcodeFind) — see the "SparkScan hand-off" note in
references/integration.md. If the user's question is purely about SparkScan (scanning, not finding), route them to thesparkscan-kmpskill instead.
Intent Routing
Based on the user's request, read references/integration.md and follow the instructions there for:
- Integrating MatrixScan Find from scratch (e.g. "add MatrixScan Find to my KMP app", "set up BarcodeFind", "how do I search for items with BarcodeFind")
- Building the item list to search for (e.g. "how do I set the list of barcodes to find", "add info/image to a found item", "highlight items with a custom color")
- Handling found items (e.g. "how do I know when an item is found", "what happens when the user taps finish")
- Transforming scanned barcode data (e.g. "normalize scanned barcode data before matching", "ignore certain barcodes during search")
- Customizing feedback (e.g. "change the sound when an item is found", "disable vibration")
- Customizing the BarcodeFindView UI (e.g. "hide the carousel", "change the hint text", "hide the finish button")
- Using Compose Multiplatform (e.g. "use BarcodeFind in
@Composablecode", "the barcode-compose BarcodeFindView composable") - Lifecycle wiring across Android/iOS (e.g. "why does my BarcodeFindView freeze", "onResume/onPause for BarcodeFindView")
This skill only covers integration (there is no migration guide — MatrixScan Find on KMP has no prior KMP version to migrate from).
API Usage Policy
Only use APIs that are explicitly documented in the Scandit references below. Do not invent or guess method signatures, parameters, or property names. If unsure whether an API exists or how it is called — or if a compile error occurs — fetch the relevant reference page before responding. Do not tell the user to check the docs themselves. After answering, always include the relevant link so the user can explore further.
Never construct or guess documentation URLs. When you need a specific class or property's API page:
- First check whether the page you already fetched contains a direct hyperlink to it.
- If no direct link was found, fetch the Get Started / Advanced page (see the table below), extract the actual link from it, and follow that.
URL structures can vary and guessing will lead to 404s. The KMP SDK is new; some topic-specific get-started pages referenced below may not exist yet for the kmp platform — if a link 404s, fall back to the general docs index at https://docs.scandit.com/ and tell the user the page may not be published yet.
Licence key
Scanning needs a Scandit licence key. For this skill the licence product is native and the licence platforms are ios and android.
Work through these in order — never block the user on MCP:
-
The Scandit MCP server is connected — call
ensure_scanner_setupwith productnativeand platformsiosandandroid,app_identifier(the app's bundle or application id; for web, its production domain, neverlocalhost) andenv_varSCANDIT_LICENSE_KEY. Do not run the command it returns. Then callget_license_keywith the key's id, from that result or fromlist_license_keys; iflist_license_keysshows the key is not a trial, ask the user before fetching it. Show at most a masked preview in chat; never print a full key. -
It is not connected — tell the user once that they can connect the remote Scandit MCP server,
https://ssl.scandit.com/mcp, in their MCP client, then continue from step 1. Do not edit MCP client configuration yourself.Authentication is browser-based, so it is not supported headless or in CI. The server provisions trial keys only; it never creates, revokes, or modifies production licences.
-
The user declines, or has no MCP client — they generate a key themselves at https://ssl.scandit.com (no account yet: https://ssl.scandit.com/dashboard/sign-up?p=test) and paste it in.
Then put the key into the code: write it into the licence-key call in place of the placeholder — the key get_license_key returned, or the one the user pastes or gives you — still showing only a masked preview in chat. Do not search the project, its files or the environment for a key.
References
Direct users to the right resource based on their question:
| Topic | Resource |
|---|---|
| Get Started | Intro · Get Started |
| Advanced (customization, transformer, filtering) | Advanced Configurations |
| Sample app (SparkScan search + BarcodeFind find) | In-monorepo: frameworks/kmp/samples/03_Advanced_Batch_Scanning_Samples/03_Search_and_Find/SearchAndFindSample |
| Core concepts (context, camera, views) | Core Concepts |
| SparkScan (the "search" half of search-and-find) | Route to the sparkscan-kmp skill |


