Android Camera & Barcode
The Android Activation SDK includes built-in camera and barcode capture. Today they power a single moment: scanning a product barcode while a shopper corrects or adds an item after a receipt scan. Everything here is managed by the SDK — there is nothing for you to add, call, or wire up.
Camera and barcode capture are internal capabilities of the Activation SDK. Your app does not add a camera or barcode module, call any camera or barcode APIs, or write any capture code. The SDK opens, runs, and dismisses these screens on its own. This page exists to answer questions about what the SDK does behind the scenes — not to ask you to integrate anything.
Overview
The SDK ships two layered capabilities:
| Capability | What it does |
|---|---|
| Barcode capture | An out-of-the-box scanner that reads a product barcode from a live camera preview and validates it on the device. |
| Baseline camera | The camera foundation the scanner is built on — a live viewfinder with torch, focus, and lifecycle handling. |
Today, the only place either capability surfaces to a shopper is product-barcode capture inside the Missed Earnings flow. The baseline camera has no standalone screen yet; it runs only as the engine behind the barcode scanner. (It is also the foundation for a future feature — see What's next.)
Where it's used today
When a receipt scan misses an item, the shopper can add or correct a product in the Missed Earnings flow. Instead of typing the product code by hand, they scan its barcode: the SDK opens a full-screen scanner, reads the barcode, and drops the value straight into the item they were editing.
This is the only live use of the camera in the SDK. Note that receipt scanning itself is a separate flow — see Receipt scanning is separate below.
How it fits together
Here's what happens when the SDK needs a barcode, and where the camera foundation will plug in later:
| Stage | What happens |
|---|---|
| Shopper edits or adds a product | In the Missed Earnings flow, choosing to scan opens the barcode scanner full-screen. |
| Scan and decode | The live viewfinder reads the barcode on the device and verifies it's a well-formed retail code. |
| Auto-capture | The first stable, valid barcode is captured automatically and the frame freezes. |
| Return value | The validated barcode flows back into the product the shopper was editing. |
The dashed branch shows the baseline camera as the foundation the scanner runs on, and where it will feed a future User-Generated Content (UGC) experience. That branch is reserved and not active yet.
How barcode capture works
The scanner is built for retail product barcodes and is tuned to be fast and forgiving:
- The scan experience. A full-screen live viewfinder shows a scan frame; the shopper points it at the product's barcode. Only barcodes inside the frame are read.
- On-device decoding. The barcode is read entirely on the device. The raw camera feed is not sent anywhere for decoding.
- Validation. Once decoded, the value is re-checked against the GTIN check-digit standard, so only well-formed retail barcodes are accepted and misreads are dropped.
- Auto-capture. The first stable, valid detection is captured automatically with a short haptic tap, and the frame freezes so the shopper can confirm — there's no shutter button to press.
- What happens to the value. The validated barcode is handed back to the Missed Earnings item the shopper was editing, alongside the details they confirm (such as quantity and price).
Barcode decoding happens entirely on the device. The raw camera feed is not streamed off the device for barcode reading.
Supported barcode formats
This is a product-barcode scanner. It reads the four retail product symbologies below:
| Format | Notes |
|---|---|
| EAN-13 | Standard retail product barcode. UPC-A is delivered decoded as EAN-13. |
| UPC-E | Compressed UPC used on small packages. |
| EAN-8 | Short-form retail barcode. |
| Code 128 | High-density linear barcode used on some products. |
QR codes and other 1D/2D symbologies are intentionally not supported — this scanner is purpose-built for retail product barcodes.
The camera foundation
The barcode scanner runs on a baseline camera that the SDK manages for you. Conceptually it provides:
- A live viewfinder and capture pipeline, built on Android's CameraX, with torch, lens switching, and tap-to-focus.
- Low-light assist. The camera senses when the scene is too dark and can turn the torch on automatically to keep the barcode readable. It uses a stable threshold so the torch won't flicker on and off.
- Lifecycle awareness. The camera automatically pauses when the app goes to the background and resumes when it returns — no host involvement needed.
Today this foundation is only ever exercised through the barcode scanner; there is no separate camera screen a shopper can reach.
Theming
The camera and barcode screens follow your SDK theme automatically. The same Activation.theme that styles the rest of the SDK — colors, shapes, and typography — also restyles the scanner and camera chrome, with nothing extra to configure.
Set your Activation.theme once and the barcode scanner and camera chrome restyle along with the offer wall and receipt summary. See Android Theme Customization for the full token reference.
Camera permission
Because barcode capture needs the camera, the SDK includes camera access:
The Activation SDK declares the camera permission itself — you do not add it to your app's manifest. When the SDK needs the camera, it requests the permission at that moment and handles the rationale and denied states for you. The camera is declared as an optional device feature, so your app stays installable on devices without a camera.
Receipt scanning is separate
Barcode capture is not the same as receipt scanning.
Receipt scanning uses a separate, host-launched camera flow — the offer wall's "Scan Receipt" action hands off to the paper-receipt camera, as described in Android Activation Integration. The barcode capture on this page is only for product-barcode entry inside Missed Earnings. The two are independent.
What's next
The baseline camera is also the foundation for an upcoming User-Generated Content (UGC) experience, where shoppers will capture product photos to earn rewards.
UGC is not active yet. This page will be updated when it ships.