On Nov 11, 2026 the Android Developers Blog published a case study on SmileID, an identity-verification SDK vendor in Africa, and how moving its Android SDKs to CameraX changed its numbers. Beyond the headline figures, the article shows a compact, reusable camera configuration for face capture on weak hardware. All figures below are SmileID's own, as reported in that post.
1. The problem: fragmented hardware
Android represents 85% of SmileID's target device market share, including entry-level phones, obscure regional models and ruggedized POS terminals. Under Camera1 and Camera2 they hit three recurring problems:
- OEM quirks: sensor orientation reported differently per manufacturer, giving rotated previews or wrongly oriented face captures.
- Aspect-ratio distortion: on budget devices a requested frame size could stretch the preview, distorting the face and making biometric checks useless.
- OOM crashes: processing raw high-resolution frames on devices with 1 GB of RAM or less caused fatal allocation failures.
Adoption growth was limited to 2-3x, and many verifications fell back to uploading a static photo over REST instead of running real-time on-device liveness.
2. The pipeline: Preview plus ImageAnalysis
SmileID rebuilt its SDKs on two CameraX use cases: Preview to show a correctly proportioned live feed, and ImageAnalysis to run liveness and face-in-frame detection locally and pull out the verified selfie frame. The key is how ImageAnalysis is configured: a ResolutionSelector with a target size and a fallback rule, plus a backpressure strategy.
fun configureCameraX(
cameraProvider: ProcessCameraProvider,
lifecycleOwner: LifecycleOwner,
surfaceProvider: Preview.SurfaceProvider,
executor: Executor,
analyzer: ImageAnalysis.Analyzer,
) {
val resolutionSelector = ResolutionSelector.Builder()
.setResolutionStrategy(
ResolutionStrategy(
Size(1200, 900),
ResolutionStrategy.FALLBACK_RULE_CLOSEST_HIGHER_THEN_LOWER
)
)
.setAspectRatioStrategy(AspectRatioStrategy.RATIO_4_3_FALLBACK_AUTO_STRATEGY)
.build()
val imageAnalysis = ImageAnalysis.Builder()
.setResolutionSelector(resolutionSelector)
.setBackpressureStrategy(ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST)
.build()
.also { it.setAnalyzer(executor, analyzer) }
val preview = Preview.Builder().build().also { it.surfaceProvider = surfaceProvider }
try {
cameraProvider.unbindAll()
cameraProvider.bindToLifecycle(
lifecycleOwner, CameraSelector.DEFAULT_FRONT_CAMERA, preview, imageAnalysis
)
} catch (exc: Exception) {
// surface the binding failure to the caller
}
}
This mirrors the sample in the post. Two choices matter. FALLBACK_RULE_CLOSEST_HIGHER_THEN_LOWER prioritizes sharpness when 1200x900 is not supported; the post says to use FALLBACK_RULE_CLOSEST_LOWER_THEN_HIGHER instead if you need to cap memory. And STRATEGY_KEEP_ONLY_LATEST drops older frames while the analyzer is still busy, which keeps the pipeline responsive on slow processors.
Why the 4x matters: SmileID crops the face region and compresses it on-device, so the upload size stayed identical to the previous system. Sharper input for the ML models, no extra cellular data cost for users.
3. Why it works across 18,000+ devices
- Camera and Media Test Lab: per the post, an automated suite runs daily across more than 190 physical Android device models, catching library regressions before they reach your app.
- Built-in device quirks: CameraX keeps internal quirk classes (
DeviceQuirks,CameraQuirksin camera-camera2) and injects a workaround when it detects a known-bad device, so your code carries no manufacturer-specific branches.
4. Reported results
- 20% increase in verification pass rates for apps using the SDKs.
- SDK adoption: 15x in the first year, 20x by year two, versus 2-3x before.
- 160 million+ identity verifications processed to date.
These are vendor-reported results from a Google-published case study. Treat the adoption multiples as directional; the portable lesson is the configuration, not the percentages.
5. The CameraX Skill
The post also points to a CameraX Skill for AI coding agents, covering Camera1 migration, lifecycle binding, ConcurrentCamera and MlKitAnalyzer, and both PreviewView and CameraXViewfinder. Add it with android skills add camerax in the Android CLI.
Takeaways for your own camera code
- For analysis, request a target size with
ResolutionSelectorand choose the fallback rule deliberately: sharpness or memory. - Always pair
ImageAnalysiswithSTRATEGY_KEEP_ONLY_LATESTif you can afford dropped frames. - Downscale or crop on-device before upload instead of lowering capture resolution.
- Delete manufacturer-specific camera workarounds before adopting CameraX; its quirk handling already covers many of them.
Source: "How SmileID Scaled Identity Verification to 18,000+ Android Device Types with CameraX", Android Developers Blog, Nov 11, 2026, retrieved Nov 12, 2026.
No comments yet. Be the first to leave one!