Google ML Kit
PaketFree on-device barcode scanner for Android and iOS; doc scanner is Android-only
- Fiyat
- Free, runs on device
- Erişim
- None, runs on device
Hakkında
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).
Neler yapabilirsin
- 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
Başlarken
- 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
Örnek kod
// 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()) }Ayrıntılar
- Barındırma
- Kendi bilgisayarında
- Kullanılabildiği yerler
- Tüm dünya
- Resmi SDK'lar
- Kotlin, Java, Swift
- MCP sunucusu
- Yok