Skip to main content

ScanOptions

Configures a scan session. Build via ScanOptions.Builder and pass to the recognizer before starting a scan.

Package: com.microblink

Declaration

class ScanOptions : Parcelable

Quick Reference

Properties

PropertyDescription
countryCode()ISO country code for regional scanning
detectBarcodes()Whether barcode detection is enabled
detectDuplicates()Whether duplicate receipt detection is enabled
detectEdges()Whether edge detection is enabled
detectLogo()Whether merchant logo detection is enabled
edgeDetectionConfiguration()Configuration for edge detection behavior
externalStorage()Whether external storage is used during the scan session
filterSensitiveData()Whether sensitive data is redacted
frameCharacteristics()Image frame characteristics configuration
merchantConfiguration()Merchant-specific configuration
promotionSlugs()Promotion slugs to evaluate
returnSubProducts()Whether sub-products are included in results
returnVoidedProducts()Whether voided line items are included
searchTargets()Target products to search for
storeFrames()Whether captured frames are stored
validatePromotions()Whether promotions should be validated

Builder

val options = ScanOptions.Builder()
.countryCode("US")
.detectDuplicates(true)
.filterSensitiveData(true)
.build()

Properties

countryCode()

fun countryCode(): String
// Builder: .countryCode(String)

ISO country code for regional scanning and merchant matching configuration.


detectBarcodes()

fun detectBarcodes(): Boolean
// Builder: .detectBarcodes(Boolean)

Whether barcode detection is enabled during scanning.

Default: false


detectDuplicates()

fun detectDuplicates(): Boolean
// Builder: .detectDuplicates(Boolean)

Whether duplicate receipt detection is enabled.

Default: false


detectEdges()

fun detectEdges(): Boolean

Whether edge detection is enabled to identify receipt boundaries.


fun detectLogo(): Boolean
// Builder: .logoDetection(Boolean)

Whether merchant logo detection is enabled.

Default: false


edgeDetectionConfiguration()

fun edgeDetectionConfiguration(): EdgeDetectionConfiguration?
// Builder: .edgeDetectionConfiguration(EdgeDetectionConfiguration)

Configuration object for edge detection behavior.


externalStorage()

fun externalStorage(): Boolean

Whether external storage is used during the scan session.


filterSensitiveData()

fun filterSensitiveData(): Boolean
// Builder: .filterSensitiveData(Boolean)

Whether sensitive data (e.g., full credit card numbers) is redacted from results.

Default: false


frameCharacteristics()

fun frameCharacteristics(): FrameCharacteristics
// Builder: .frameCharacteristics(FrameCharacteristics)

Image frame characteristics configuration (resolution, quality thresholds).


merchantConfiguration()

fun merchantConfiguration(): MerchantConfiguration?
// Builder: .merchantConfiguration(MerchantConfiguration)

Merchant-specific configuration for detection and matching behavior.


promotionSlugs()

fun promotionSlugs(): List<Slug>?
// Builder: .promotionSlugs(List<Slug>)

Promotion slugs to evaluate against the receipt.


returnSubProducts()

fun returnSubProducts(): Boolean
// Builder: .returnSubProducts(Boolean)

Whether sub-products (e.g., combo components) are included in results.

Default: false


returnVoidedProducts()

fun returnVoidedProducts(): Boolean
// Builder: .returnVoidedProducts(Boolean)

Whether voided or cancelled line items are included in results.

Default: false


searchTargets()

fun searchTargets(): List<Product>?
// Builder: .searchTargets(List<Product>)

Target products to search for within the scanned receipt.


storeFrames()

fun storeFrames(): Boolean

Whether captured image frames are stored during the scan session.


validatePromotions()

fun validatePromotions(): Boolean
// Builder: .validatePromotions(Boolean)

Whether promotions should be validated against the receipt data.

Default: false