Barcode
Represents a barcode detected on a receipt. Returned by ScanResults.barcodes(). Barcodes found by the camera's barcode detector are included when ScanOptions.detectBarcodes() is enabled; a barcode value read by the receipt OCR is also added, with type Text.
Package: com.microblink.core
Declaration
open class Barcode : Parcelable
Quick Reference
Properties
| Property | Description |
|---|---|
text() | The decoded barcode value |
type() | The kind of content the barcode encodes |
Methods
| Method | Description |
|---|---|
newBuilder() | Creates a Barcode.Builder |
Properties
text()
fun text(): String?
The decoded barcode value.
type()
fun type(): BarcodeType?
The kind of content the barcode encodes (not its symbology, such as QR or EAN-13). BarcodeType (com.microblink.core) values:
| Value | Content |
|---|---|
Unknown | Unknown content type |
ContactInfo | Contact information |
Email | Email address |
Isbn | ISBN |
Phone | Phone number |
Product | Product code |
Sms | SMS message |
Text | Plain text |
Url | URL |
Wifi | Wi-Fi network settings |
Geo | Geographic location |
CalendarEvent | Calendar event |
DriverLicense | Driver's license data |
Methods
newBuilder()
// Java static method
fun newBuilder(): Barcode.Builder
Returns a Barcode.Builder with .text(String?), .type(BarcodeType) and build(). Useful for test fixtures.