This guide covers everything you need to integrate paper receipt scanning into your Android app: how it works, setup, camera options, correction flows, and references.
How It Works
- Capture — The user photographs a receipt using the device camera.
- Extract — OCR processes the image on-device and returns structured data: merchant, date, total, line items, payment method, and more.
- Enrich (optional) — If Product Intelligence is enabled, extracted line items are matched against the product catalog for UPC, brand, category, and normalized product names.
All processing happens on-device. No receipt images are sent to the cloud.
Requirements
| Requirement | Version |
|---|---|
| Android Min SDK | 23+ (Android 6.0+) |
| Android Compile SDK | 36+ |
| Java | 17+ |
| Architecture | armeabi-v7a, arm64-v8a |
| Camera | 720p+ |
Installation
- Add the Maven repository:
Kotlin DSL:
repositories {
maven { url = uri("https://maven.microblink.com") }
}
Groovy:
repositories {
maven { url "https://maven.microblink.com" }
}
- Add the dependencies:
Kotlin DSL:
dependencies {
implementation(platform("com.microblink.blinkreceipt:blinkreceipt-bom:1.9.13"))
implementation("com.microblink.blinkreceipt:blinkreceipt-recognizer")
implementation("com.microblink.blinkreceipt:blinkreceipt-camera-ui") // for out-of-box camera
}
Groovy:
dependencies {
implementation platform("com.microblink.blinkreceipt:blinkreceipt-bom:1.9.13")
implementation "com.microblink.blinkreceipt:blinkreceipt-recognizer"
implementation "com.microblink.blinkreceipt:blinkreceipt-camera-ui" // for out-of-box camera
}
The blinkreceipt-camera-ui module provides the out-of-the-box and enhanced camera experiences. If you only need the recognizer for a fully custom camera, you can omit it.
→ Android SDK Repository (GitHub)
License Configuration
Option A: Android Manifest
<meta-data
android:name="com.microblink.LicenseKey"
android:value="YOUR-LICENSE-KEY"
/>
Option B: Programmatically
Kotlin:
BlinkReceiptSdk.licenseKey = "YOUR-LICENSE-KEY"
Java:
BlinkReceiptSdk.licenseKey("YOUR-LICENSE-KEY");
Add camera permission to AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA" />
Initialize the SDK
Kotlin:
BlinkReceiptSdk.initialize(this, object : InitializeCallback {
override fun onComplete() {
// Ready to use
}
override fun onException(throwable: Throwable) {
// Log exception
}
})
Java:
BlinkReceiptSdk.initialize(this, new InitializeCallback() {
@Override
public void onComplete() {
// Ready to use
}
@Override
public void onException(@NonNull Throwable throwable) {
// Log exception
}
});
Camera Options
Option A: Out-of-the-Box Camera (Standard)
The blinkreceipt-camera-ui module provides a complete camera interface with alignment guidance, blur detection, and real-time feedback. This is the fastest integration path.
Option B: Enhanced Camera UX
Same module with enhanced configuration. Includes improved graphics, messaging, and animations.
Data Chips: Enable on-screen indicators showing when key fields are detected:
| Option | What it does |
|---|---|
enableDateChip | Shows when the purchase date has been found |
enableTotalChip | Shows when the total has been found |
enableMerchantChip | Shows when the merchant has been identified |
Note: Some merchant detection methods only run at the end of the scan session. The merchant chip may not appear during scanning but the merchant will still be returned in the results.
Option C: Custom Camera (RecognizerView)
For full UI control, use the RecognizerView component directly in your layout:
- Add
RecognizerViewto your XML layout. - Build your own buttons, overlays, and controls around it.
- Forward all activity lifecycle callbacks (
onCreate,onResume,onPause,onDestroy) to theRecognizerView. Required for proper camera management. - Use the
RecognizerViewmethods to control scanning: capture, confirm, finish, and cancel.
Option D: Jetpack Compose
→ Camera UI + Jetpack Compose Integration Guide
Long Receipts
For receipts that don’t fit in a single frame, the SDK supports multi-frame capture:
- The user captures the first section of the receipt normally.
- After the first capture, the bottom edge of the previous frame appears at the top of the screen as an alignment guide.
- The user positions the next section with slight overlap and captures again.
- Repeat until the entire receipt is captured.
- The SDK stitches all frames together and returns a single set of results.
The out-of-the-box and enhanced cameras handle this flow automatically. If using RecognizerView, you are responsible for displaying alignment cues and managing the frame sequence.
Receipt Correction
The Android SDK supports the same receipt correction capabilities as iOS.
Stock Correction UI: Launch the built-in correction interface by passing a Blink Receipt ID. The user sees extracted products and prices, can edit any item, add missed items, and scan barcodes for UPC lookup. Corrected results include updated promotion qualification status.
Custom Correction UI: Build your own interface using the SDK’s data and correction methods. Load scan results, display your own editing UI, call the SDK’s correction methods, and submit modified results for validation.
Fields in corrected results:
userAdded— Product was added by the user during correctionuserModified— One or more product properties were changed during correction
Localization (Override Labels)
All text elements in the camera UI can be customized by overriding string resources.
PDF Recognition
The Android SDK also supports extracting data from PDF receipt files (not available on iOS).
→ PDF Recognition — Getting Started → PDF Recognition — Configuration → PDF Recognition — How to Use
Receipt Quality & Feedback
| Field | What it tells you |
|---|---|
is_receipt | Whether the image appears to be a valid receipt |
is_blurry | Whether the image is too blurry to extract reliably |
is_screen | Whether the image appears to be a photo of a screen |
is_fraudulent | Whether the receipt appears manipulated or counterfeit (US only, select banners) |
is_duplicate | Whether this receipt has been submitted before (2-week window, within your instance) |
ocr_confidence | Average OCR confidence score across all characters |
Testing Recommendations
- Test with various receipt types: thermal, inkjet, laser-printed
- Test in different lighting conditions: bright, dim, mixed
- Test with challenging receipts: crumpled, faded, long, torn
- Test across device types: older phones, budget devices, different screen sizes
Implementation Timeline
| Scope | Estimated Dev Time |
|---|---|
| Out-of-the-Box Camera | ~1 week + QA |
| Custom Camera | ~2 weeks + QA |
Additional References
- Android Javadoc
- WorkManager Integration
- Android 16 (API 36) Migration Guide
- Maven Migration Guide
- Barcode Scanning Migration (v1.9.5+)