Google ML Kit
PackageFree on-device barcode scanner for Android and iOS; doc scanner is Android-only
- Price
- Free, runs on device
- Access
- None, runs on device
About
Google's ML Kit runs on the device, offline and at no cost. Barcode scanning reads QR, EAN, UPC, PDF417 and other formats on Android and iOS, up to 10 codes per image. The document scanner flow, delivered by Google Play services, is Android-only (API 21+, 1.7 GB RAM).
What you can do with it
- Scan QR codes and product barcodes from the camera in an Android or iOS app
- Add a ready-made document scanner with edge detection to an Android app
- Get scanned pages as PDF or JPEG without asking for camera permission on Android
Get started
- Add com.google.mlkit:barcode-scanning to your Android app
- Or add the GoogleMLKit/BarcodeScanning pod in your iOS app
- Add play-services-mlkit-document-scanner for the Android scanner
Example
// Android (Kotlin): Google code scanner, no camera permission needed
GmsBarcodeScanning.getClient(this).startScan()
.addOnSuccessListener { barcode -> println(barcode.rawValue) }
// Android only: document scanner that returns a PDF
val options = GmsDocumentScannerOptions.Builder()
.setResultFormats(RESULT_FORMAT_PDF)
.setScannerMode(SCANNER_MODE_FULL)
.build()
GmsDocumentScanning.getClient(options).getStartScanIntent(this)
.addOnSuccessListener { sender -> scannerLauncher.launch(IntentSenderRequest.Builder(sender).build()) }Details
- Hosting
- Runs locally
- Available in
- Worldwide
- Official SDKs
- Kotlin, Java, Swift
- MCP server
- None